netpoet coop and 64kode
This commit is contained in:
80
netpoet-coop-8k/8kode.sln
Normal file
80
netpoet-coop-8k/8kode.sln
Normal file
@@ -0,0 +1,80 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34302.85
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "intro", "src\intro\intro.vcxproj", "{EC001821-5569-4BB5-87B3-20CB8FF9137B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF} = {6D00EB12-7129-482A-8011-F187F20345DF}
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931} = {930621BA-75BE-49FE-80DE-E75E7DC06931}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tool", "src\tool\tool.csproj", "{6D00EB12-7129-482A-8011-F187F20345DF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931} = {930621BA-75BE-49FE-80DE-E75E7DC06931}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "shc", "src\shc\shc.csproj", "{930621BA-75BE-49FE-80DE-E75E7DC06931}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Authoring|Mixed Platforms = Authoring|Mixed Platforms
|
||||
Compress|Mixed Platforms = Compress|Mixed Platforms
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
ShaderDebug|Mixed Platforms = ShaderDebug|Mixed Platforms
|
||||
Video|Mixed Platforms = Video|Mixed Platforms
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Authoring|Mixed Platforms.ActiveCfg = Authoring|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Authoring|Mixed Platforms.Build.0 = Authoring|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Compress|Mixed Platforms.ActiveCfg = Compress|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Compress|Mixed Platforms.Build.0 = Compress|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Release|Mixed Platforms.Build.0 = Release|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.ShaderDebug|Mixed Platforms.ActiveCfg = ShaderDebug|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.ShaderDebug|Mixed Platforms.Build.0 = ShaderDebug|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Video|Mixed Platforms.ActiveCfg = Video|Win32
|
||||
{EC001821-5569-4BB5-87B3-20CB8FF9137B}.Video|Mixed Platforms.Build.0 = Video|Win32
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Authoring|Mixed Platforms.ActiveCfg = Authoring|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Authoring|Mixed Platforms.Build.0 = Authoring|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Compress|Mixed Platforms.ActiveCfg = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Compress|Mixed Platforms.Build.0 = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Release|Mixed Platforms.ActiveCfg = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Release|Mixed Platforms.Build.0 = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.ShaderDebug|Mixed Platforms.ActiveCfg = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.ShaderDebug|Mixed Platforms.Build.0 = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Video|Mixed Platforms.ActiveCfg = Void|Any CPU
|
||||
{6D00EB12-7129-482A-8011-F187F20345DF}.Video|Mixed Platforms.Build.0 = Void|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Authoring|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Authoring|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Compress|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Compress|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.ShaderDebug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.ShaderDebug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Video|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{930621BA-75BE-49FE-80DE-E75E7DC06931}.Video|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0B9AAD13-CD66-4F4D-B063-233F8A654429}
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
netpoet-coop-8k/packages/AvalonEdit.5.0.2/AvalonEdit.5.0.2.nupkg
vendored
Normal file
BIN
netpoet-coop-8k/packages/AvalonEdit.5.0.2/AvalonEdit.5.0.2.nupkg
vendored
Normal file
Binary file not shown.
33
netpoet-coop-8k/packages/AvalonEdit.5.0.2/AvalonEdit.5.0.2.nuspec
vendored
Normal file
33
netpoet-coop-8k/packages/AvalonEdit.5.0.2/AvalonEdit.5.0.2.nuspec
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>AvalonEdit</id>
|
||||
<version>5.0.2</version>
|
||||
<authors>Daniel Grunwald</authors>
|
||||
<owners>Daniel Grunwald</owners>
|
||||
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
|
||||
<projectUrl>http://www.avalonedit.net/</projectUrl>
|
||||
<iconUrl>http://community.sharpdevelop.net/blogs/mattward/SharpDevelop.png</iconUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>AvalonEdit is the WPF-based text editor used in SharpDevelop. There are two builds of AvalonEdit included in this package. One that targets .NET 4.0 and one that targets .NET 3.5.</description>
|
||||
<summary>AvalonEdit is the WPF-based text editor used in SharpDevelop</summary>
|
||||
<releaseNotes>* License changed from LGPL to MIT
|
||||
* New Feature: Hide mouse cursor while typing (enabled by default)
|
||||
* New Feature: Highlight current line (disabled by default)
|
||||
* New Feature: Overstrike mode (disabled by default)
|
||||
* New Feature: 'underline' attribute in syntax highlighting definitions
|
||||
* AvalonEdit now raises the WPF DataObject attached events on clipboard and drag'n'drop operations.
|
||||
* Encoding detection now distinguishes between UTF-8 with BOM and UTF-8 without BOM. This prevents AvalonEdit from adding the BOM to existing UTF-8 files.
|
||||
* Improved handling of grapheme clusters. A base character followed by a combining mark is now treated as a single character by the caret movement logic.
|
||||
* Added RichText, RichTextModel and RichTextColorizer.
|
||||
* Renamed the VB highlighting mode from "VBNET" to "VB"
|
||||
* Changed IHighlighter API in order to support SharpDevelop's semantic C# highlighter
|
||||
* The regex-based highlighting engine was moved into its own class (HighlightingEngine) to be separated from the state-tracking logic in DocumentHighlighter.
|
||||
* Add FileName property to TextDocument class.
|
||||
* DocumentChangeEventArgs.RemovedText/InsertedText are now of type ITextSource instead of string.
|
||||
* The error-tolerant XML parser included with AvalonEdit was removed. An improved version of this parser is part of the NRefactory 5 project.
|
||||
* Removed some obsolete APIs.</releaseNotes>
|
||||
<language>en-US</language>
|
||||
<tags>WPF Text Editor SharpDevelop AvalonEdit</tags>
|
||||
</metadata>
|
||||
</package>
|
||||
BIN
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net35/ICSharpCode.AvalonEdit.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net35/ICSharpCode.AvalonEdit.dll
vendored
Normal file
Binary file not shown.
9939
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net35/ICSharpCode.AvalonEdit.xml
vendored
Normal file
9939
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net35/ICSharpCode.AvalonEdit.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net40/ICSharpCode.AvalonEdit.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net40/ICSharpCode.AvalonEdit.dll
vendored
Normal file
Binary file not shown.
9939
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net40/ICSharpCode.AvalonEdit.xml
vendored
Normal file
9939
netpoet-coop-8k/packages/AvalonEdit.5.0.2/lib/Net40/ICSharpCode.AvalonEdit.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/SharpDX.4.0.1.nupkg
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/SharpDX.4.0.1.nupkg
vendored
Normal file
Binary file not shown.
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net40/SharpDX.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net40/SharpDX.dll
vendored
Normal file
Binary file not shown.
38946
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net40/SharpDX.xml
vendored
Normal file
38946
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net40/SharpDX.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net45/SharpDX.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net45/SharpDX.dll
vendored
Normal file
Binary file not shown.
38946
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net45/SharpDX.xml
vendored
Normal file
38946
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/net45/SharpDX.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netcoreapp1.0/SharpDX.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netcoreapp1.0/SharpDX.dll
vendored
Normal file
Binary file not shown.
38946
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netcoreapp1.0/SharpDX.xml
vendored
Normal file
38946
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netcoreapp1.0/SharpDX.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netstandard1.1/SharpDX.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netstandard1.1/SharpDX.dll
vendored
Normal file
Binary file not shown.
38957
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netstandard1.1/SharpDX.xml
vendored
Normal file
38957
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/netstandard1.1/SharpDX.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/uap10.0/SharpDX.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/uap10.0/SharpDX.dll
vendored
Normal file
Binary file not shown.
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/uap10.0/SharpDX.pri
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/uap10.0/SharpDX.pri
vendored
Normal file
Binary file not shown.
34497
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/uap10.0/SharpDX.xml
vendored
Normal file
34497
netpoet-coop-8k/packages/SharpDX.4.0.1/lib/uap10.0/SharpDX.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/SharpDX.Mathematics.4.0.1.nupkg
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/SharpDX.Mathematics.4.0.1.nupkg
vendored
Normal file
Binary file not shown.
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net40/SharpDX.Mathematics.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net40/SharpDX.Mathematics.dll
vendored
Normal file
Binary file not shown.
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net40/SharpDX.Mathematics.xml
vendored
Normal file
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net40/SharpDX.Mathematics.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net45/SharpDX.Mathematics.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net45/SharpDX.Mathematics.dll
vendored
Normal file
Binary file not shown.
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net45/SharpDX.Mathematics.xml
vendored
Normal file
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/net45/SharpDX.Mathematics.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netcoreapp1.0/SharpDX.Mathematics.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netcoreapp1.0/SharpDX.Mathematics.dll
vendored
Normal file
Binary file not shown.
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netcoreapp1.0/SharpDX.Mathematics.xml
vendored
Normal file
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netcoreapp1.0/SharpDX.Mathematics.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netstandard1.1/SharpDX.Mathematics.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netstandard1.1/SharpDX.Mathematics.dll
vendored
Normal file
Binary file not shown.
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netstandard1.1/SharpDX.Mathematics.xml
vendored
Normal file
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/netstandard1.1/SharpDX.Mathematics.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/uap10.0/SharpDX.Mathematics.dll
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/uap10.0/SharpDX.Mathematics.dll
vendored
Normal file
Binary file not shown.
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/uap10.0/SharpDX.Mathematics.pri
vendored
Normal file
BIN
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/uap10.0/SharpDX.Mathematics.pri
vendored
Normal file
Binary file not shown.
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/uap10.0/SharpDX.Mathematics.xml
vendored
Normal file
16396
netpoet-coop-8k/packages/SharpDX.Mathematics.4.0.1/lib/uap10.0/SharpDX.Mathematics.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
netpoet-coop-8k/packages/repositories.config
Normal file
4
netpoet-coop-8k/packages/repositories.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<repositories>
|
||||
<repository path="..\src\tool\packages.config" />
|
||||
</repositories>
|
||||
58
netpoet-coop-8k/readme.txt
Normal file
58
netpoet-coop-8k/readme.txt
Normal file
@@ -0,0 +1,58 @@
|
||||
Alcatraz 8kode
|
||||
=========
|
||||
|
||||
A framework for developing 8k intros.
|
||||
|
||||
Initial setup:
|
||||
1) Start Visual Studio 2013 and open 8kode.sln
|
||||
2) Right click your solution and choose "Set StartUp Projects..."
|
||||
3) Under Common Properties -> Startup Project, choose "Multiple startup projects"
|
||||
4) Set both "intro" and "tool" to Start.
|
||||
5) Click "OK"
|
||||
6) Set your build configuration to "Authoring"
|
||||
7) Hit F5 and enjoy.
|
||||
|
||||
Interface:
|
||||
8kode's interface is very similar to Blender 2.5.
|
||||
If you're unfamiliar with it, please have a look at http://vimeo.com/19628478 starting from 1:59
|
||||
You can set up multiple views of the same data, and you can split, resize and merge views as you need.
|
||||
Layouts can be saved and loaded using the Layouts menu.
|
||||
|
||||
Intro navigation:
|
||||
You can move through time by clicking and dragging in the Audio view.
|
||||
The seek positions snap to intro "scenes".
|
||||
A scene is defined by SOUND_TICKS_PER_SCENE * SAMPLES_PER_TICK samples.
|
||||
The preconfigured SOUND_TICKS_PER_SCENE is 64 ticks and SAMPLES_PER_TICK is provided by 4klang.h
|
||||
|
||||
File and folder structure:
|
||||
The intro coder musn't take care of the src\intro\framework folder.
|
||||
Shaders are inside src\intro\shaders, intro code is inside src\intro\intro.
|
||||
Put your intro init code in src\intro\intro\init.h and your per-frame code in src\intro\intro\update.h.
|
||||
Variables and such can be put in src\intro\intro\data.h
|
||||
|
||||
Shader compiler tool (shc):
|
||||
8kode comes with a shader preprocessor. It has 2 main purposes:
|
||||
1) Resolve all #includes, so that Ctrl+Alt+Test's shader minifier can minify everything together
|
||||
2) Automatically generate C++ code with ready-to-use DirectX shader pointers
|
||||
In order to have autogenerated shader pointers, you can use an [EntryPoint(foo)] attribute on your HLSL function.
|
||||
This will signal shc that this function is an entry point, and it will create a corresponding IID3D11FooShader* pointer.
|
||||
Obviously you should replace foo with the correct shader profile name (e.g. vs, ps, cs).
|
||||
Example:
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
[entrypoint(cs)]
|
||||
void colorPattern(uint3 id:SV_DispatchThreadID)
|
||||
{
|
||||
float2 resolution;
|
||||
out0.GetDimensions(resolution.x, resolution.y);
|
||||
out0[id.xy] = float4(id.xy / resolution, 0.5, 1.0);
|
||||
}
|
||||
|
||||
When compiling with shc, it will generate corresponding code and provide a ID3D11ComputeShader* cs_colorPattern pointer.
|
||||
The coder can use that pointer immediately in the intro code.
|
||||
8kode's authoring tool allows instant shader compilation with the shortcut Ctrl+Enter. It invokes shc, which in turn:
|
||||
1) generates intro\framework\shaders_shc.h, containing all entry point shader pointers and compile code for the intro
|
||||
2) runs Ctrl+Alt+Test's shader minifier and outputs the minified shader to intro\framework\intro_hlsl.h
|
||||
3) recompiles every entry point that was present at the last intro compile time. If entry points changed, a tool restart is required.
|
||||
All shader compilation errors are marked in the code view as line decorations. Hovering over marked lines will display a tooltip
|
||||
with the errors in that line.
|
||||
663
netpoet-coop-8k/src/intro/framework/authoring.h
Normal file
663
netpoet-coop-8k/src/intro/framework/authoring.h
Normal file
@@ -0,0 +1,663 @@
|
||||
#pragma once
|
||||
|
||||
#include <Shlwapi.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
static HANDLE shaderCompileEvent;
|
||||
static bool shadersOK = true;
|
||||
|
||||
struct SharedMemoryToolType
|
||||
{
|
||||
int WindowWidth;
|
||||
int WindowHeight;
|
||||
int MaxSamples;
|
||||
int SampleSize;
|
||||
int SamplesPerTick;
|
||||
int TicksPerScene;
|
||||
float IntroPosition;
|
||||
int AudioRenderPosition;
|
||||
int SeekToRow;
|
||||
HWND introHandle;
|
||||
HWND analysisHandle;
|
||||
int KeepAlive;
|
||||
int DisplayTextureIndex;
|
||||
int AudioIsPlaying;
|
||||
int CanCaptureFrame;
|
||||
int CaptureOneFrame;
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC histogramTextureDesc =
|
||||
{
|
||||
256,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_UNORDERED_ACCESS,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC histogramStagingTextureDesc =
|
||||
{
|
||||
256,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_STAGING,
|
||||
0,
|
||||
D3D11_CPU_ACCESS_READ,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE1D_DESC histogramBucketTextureDesc =
|
||||
{
|
||||
257,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R32_UINT,
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_UNORDERED_ACCESS,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC paradeVectorScopeBucketTextureDesc =
|
||||
{
|
||||
257,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R32_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_UNORDERED_ACCESS,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC paradeTextureDesc =
|
||||
{
|
||||
4 * 256,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_UNORDERED_ACCESS,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC paradeStagingTextureDesc =
|
||||
{
|
||||
4 * 256,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_STAGING,
|
||||
0,
|
||||
D3D11_CPU_ACCESS_READ,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC vectorScopeTextureDesc =
|
||||
{
|
||||
256,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_UNORDERED_ACCESS,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_TEXTURE2D_DESC vectorScopeStagingTextureDesc =
|
||||
{
|
||||
256,
|
||||
256,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_STAGING,
|
||||
0,
|
||||
D3D11_CPU_ACCESS_READ,
|
||||
0
|
||||
};
|
||||
|
||||
static D3D11_UNORDERED_ACCESS_VIEW_DESC histogramUAVdesc =
|
||||
{
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
D3D11_UAV_DIMENSION_TEXTURE2D,
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static D3D11_UNORDERED_ACCESS_VIEW_DESC histogramBucketUAVdesc =
|
||||
{
|
||||
DXGI_FORMAT_R32_UINT,
|
||||
D3D11_UAV_DIMENSION_TEXTURE1D,
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static D3D11_UNORDERED_ACCESS_VIEW_DESC paradeUAVdesc =
|
||||
{
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
D3D11_UAV_DIMENSION_TEXTURE2D,
|
||||
{ 0, 1 }
|
||||
};
|
||||
|
||||
static D3D11_UNORDERED_ACCESS_VIEW_DESC paradeVectorScopeBucketUAVdesc =
|
||||
{
|
||||
DXGI_FORMAT_R32_UINT,
|
||||
D3D11_UAV_DIMENSION_TEXTURE2D,
|
||||
{ 0, 1 }
|
||||
};
|
||||
|
||||
static D3D11_UNORDERED_ACCESS_VIEW_DESC vectorScopeUAVdesc =
|
||||
{
|
||||
DXGI_FORMAT_R8G8B8A8_UINT,
|
||||
D3D11_UAV_DIMENSION_TEXTURE2D,
|
||||
{ 0, 1 }
|
||||
};
|
||||
|
||||
static D3D11_SHADER_RESOURCE_VIEW_DESC analysisSRVdesc =
|
||||
{
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2DMS,
|
||||
{ 0, 1 }
|
||||
};
|
||||
|
||||
static D3D11_RENDER_TARGET_VIEW_DESC resolveRTVdesc =
|
||||
{
|
||||
DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
D3D11_RTV_DIMENSION_TEXTURE2DMS,
|
||||
{ 0, 1 }
|
||||
};
|
||||
|
||||
static SharedMemoryToolType* SharedMemoryTool;
|
||||
static char* SharedImage;
|
||||
static HANDLE AudioFileMapping;
|
||||
static HANDLE ImageFileMapping;
|
||||
static HANDLE HistogramFileMapping;
|
||||
static HANDLE ParadeFileMapping;
|
||||
static HANDLE VectorscopeFileMapping;
|
||||
static HANDLE SharedMemoryFileMapping;
|
||||
static HANDLE SyncDataFileMapping;
|
||||
static HANDLE SyncOverrideDataFileMapping;
|
||||
static HANDLE DisplayTextureFileMapping;
|
||||
static HANDLE TextureNamesFileMapping;
|
||||
static bool playMusic;
|
||||
static long musicStartOffset;
|
||||
static D3D11_TEXTURE2D_DESC analysisDesc;
|
||||
static D3D11_TEXTURE2D_DESC displayDesc;
|
||||
static ID3D11Texture2D* resolvedTexture;
|
||||
static ID3D11Texture2D* stagingTexture;
|
||||
static ID3D11Texture2D* histogramTexture;
|
||||
static ID3D11Texture1D* histogramRedBucketTexture;
|
||||
static ID3D11Texture1D* histogramGreenBucketTexture;
|
||||
static ID3D11Texture1D* histogramBlueBucketTexture;
|
||||
static ID3D11Texture2D* histogramStagingTexture;
|
||||
static ID3D11Texture2D* paradeRedBucketTexture;
|
||||
static ID3D11Texture2D* paradeGreenBucketTexture;
|
||||
static ID3D11Texture2D* paradeBlueBucketTexture;
|
||||
static ID3D11Texture2D* paradeAlphaBucketTexture;
|
||||
static ID3D11Texture2D* paradeTexture;
|
||||
static ID3D11Texture2D* paradeStagingTexture;
|
||||
static ID3D11Texture2D* vectorScopeBucketTexture;
|
||||
static ID3D11Texture2D* vectorScopeTexture;
|
||||
static ID3D11Texture2D* vectorScopeStagingTexture;
|
||||
static ID3D11Texture2D* displayRGBTexture;
|
||||
static ID3D11Texture2D* displayATexture;
|
||||
static ID3D11Texture2D* displayStagingTexture;
|
||||
static ID3D11ComputeShader* csHistogramGather;
|
||||
static ID3D11ComputeShader* csHistogramMaximum;
|
||||
static ID3D11ComputeShader* csHistogramSpread;
|
||||
static ID3D11ComputeShader* csParadeVectorscopeGather;
|
||||
static ID3D11ComputeShader* csParadeVectorscopeMaximum;
|
||||
static ID3D11ComputeShader* csParadeVectorscopeSpread;
|
||||
static ID3D11PixelShader* psResolve;
|
||||
static ID3D11VertexShader* vsResolve;
|
||||
static ID3D11RenderTargetView* resolvedRTV;
|
||||
static ID3D11ComputeShader* csTextureViewer;
|
||||
static ID3D11UnorderedAccessView* histogramUAV;
|
||||
static ID3D11UnorderedAccessView* histogramRedBucketUAV;
|
||||
static ID3D11UnorderedAccessView* histogramGreenBucketUAV;
|
||||
static ID3D11UnorderedAccessView* histogramBlueBucketUAV;
|
||||
static ID3D11UnorderedAccessView* paradeUAV;
|
||||
static ID3D11UnorderedAccessView* paradeRedBucketUAV;
|
||||
static ID3D11UnorderedAccessView* paradeGreenBucketUAV;
|
||||
static ID3D11UnorderedAccessView* paradeBlueBucketUAV;
|
||||
static ID3D11UnorderedAccessView* paradeAlphaBucketUAV;
|
||||
static ID3D11UnorderedAccessView* vectorScopeUAV;
|
||||
static ID3D11UnorderedAccessView* displayRGBUAV;
|
||||
static ID3D11UnorderedAccessView* displayAUAV;
|
||||
static ID3D11UnorderedAccessView* vectorScopeBucketUAV;
|
||||
static ID3D11ShaderResourceView* analysisSRV;
|
||||
static D3D11_MAPPED_SUBRESOURCE mappedResource;
|
||||
static float* histogram;
|
||||
static float* parade;
|
||||
static float* vectorscope;
|
||||
static char* syncDataAudio;
|
||||
static char* syncOverrideData;
|
||||
static char* displayTextureData;
|
||||
static char* textureNamesData;
|
||||
static HANDLE hShaderErrorPipe;
|
||||
static bool oldAudioIsPlaying;
|
||||
|
||||
extern "C" int _4klang_current_tick;
|
||||
|
||||
float AuthoringGetIntroPosition()
|
||||
{
|
||||
float time = SoundGetIntroPosition();
|
||||
return time + musicStartOffset / (float)(SAMPLES_PER_TICK * SOUND_TICKS_PER_SCENE);
|
||||
}
|
||||
|
||||
bool ReadFile(char* path, char** content, size_t* length)
|
||||
{
|
||||
FILE* shaderFile;
|
||||
auto error = fopen_s(&shaderFile, path, "rb");
|
||||
if (shaderFile == nullptr)
|
||||
return false;
|
||||
|
||||
fseek(shaderFile, 0, SEEK_END);
|
||||
*length = ftell(shaderFile);
|
||||
*content = new char[*length];
|
||||
fseek(shaderFile, 0, SEEK_SET);
|
||||
fread_s(*content, *length, sizeof(char), *length, shaderFile);
|
||||
fclose(shaderFile);
|
||||
return true;
|
||||
}
|
||||
|
||||
void AuthoringInit()
|
||||
{
|
||||
Log("AuthoringInit");
|
||||
SharedMemoryFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(SharedMemoryToolType), "IntroAuthor");
|
||||
AudioFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(float) * MAX_SAMPLES * 2, "IntroAudio");
|
||||
ImageFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4 * SCREENWIDTH * SCREENHEIGHT, "IntroImage");
|
||||
HistogramFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4 * 256 * 256, "IntroHistogram");
|
||||
ParadeFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4 * 4 * 256 * 256, "IntroParade");
|
||||
VectorscopeFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4 * 256 * 256, "IntroVectorscope");
|
||||
DisplayTextureFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 9 + 8 * 4096 * 4096, "IntroDisplayTexture");
|
||||
TextureNamesFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 256 * 256, "IntroTextureNames");
|
||||
SyncDataFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 1048576, "TimelineNode.Audio");
|
||||
SyncOverrideDataFileMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 1048576, "TimelineNode.Override.Audio");
|
||||
|
||||
SharedMemoryTool = (SharedMemoryToolType*)MapViewOfFile(SharedMemoryFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(SharedMemoryToolType));
|
||||
soundBuffer = (float*)MapViewOfFile(AudioFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(float)* MAX_SAMPLES * 2);
|
||||
SharedImage = (char*)MapViewOfFile(ImageFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 4 * SCREENWIDTH * SCREENHEIGHT);
|
||||
histogram = (float*)MapViewOfFile(HistogramFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 4 * 256 * 256);
|
||||
parade = (float*)MapViewOfFile(ParadeFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 4 * 4 * 256 * 256);
|
||||
vectorscope = (float*)MapViewOfFile(VectorscopeFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 4 * 256 * 256);
|
||||
syncDataAudio = (char*)MapViewOfFile(SyncDataFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 1048576);
|
||||
syncOverrideData = (char*)MapViewOfFile(SyncOverrideDataFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 1048576);
|
||||
displayTextureData = (char*)MapViewOfFile(DisplayTextureFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 9 + 8 * 4096 * 4096);
|
||||
textureNamesData = (char*)MapViewOfFile(TextureNamesFileMapping, FILE_MAP_ALL_ACCESS, 0, 0, 256 * 256);
|
||||
|
||||
auto pTextureNames = textureNamesData;
|
||||
*pTextureNames++ = (char)textureMap.size();
|
||||
for (auto texture : textureMap)
|
||||
{
|
||||
auto iSize = (char)strlen(texture.first);
|
||||
*pTextureNames++ = iSize;
|
||||
memcpy(pTextureNames, texture.first, iSize);
|
||||
pTextureNames += iSize;
|
||||
}
|
||||
displayTextureData[0] = (char)-1;
|
||||
|
||||
WaveHDR.lpData = (LPSTR)soundBuffer;
|
||||
SharedMemoryTool->WindowWidth = SCREENWIDTH;
|
||||
SharedMemoryTool->WindowHeight = SCREENHEIGHT;
|
||||
SharedMemoryTool->MaxSamples = MAX_SAMPLES;
|
||||
SharedMemoryTool->SampleSize = sizeof(float);
|
||||
SharedMemoryTool->SamplesPerTick = SAMPLES_PER_TICK;
|
||||
SharedMemoryTool->TicksPerScene = SOUND_TICKS_PER_SCENE;
|
||||
SharedMemoryTool->SeekToRow = -1;
|
||||
SharedMemoryTool->KeepAlive = true;
|
||||
SharedMemoryTool->DisplayTextureIndex = -1;
|
||||
SharedMemoryTool->AudioIsPlaying = true;
|
||||
|
||||
backBufferTexture->GetDesc(&analysisDesc);
|
||||
analysisDesc.Usage = D3D11_USAGE_DEFAULT;
|
||||
analysisDesc.Format = DXGI_FORMAT_B8G8R8A8_TYPELESS;
|
||||
analysisDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET;
|
||||
analysisDesc.SampleDesc.Count = 1;
|
||||
device->CreateTexture2D(&analysisDesc, NULL, &resolvedTexture);
|
||||
|
||||
analysisDesc.Usage = D3D11_USAGE_STAGING;
|
||||
analysisDesc.BindFlags = 0;
|
||||
analysisDesc.CPUAccessFlags |= D3D11_CPU_ACCESS_READ;
|
||||
device->CreateTexture2D(&analysisDesc, NULL, &stagingTexture);
|
||||
device->CreateShaderResourceView(resolvedTexture, &analysisSRVdesc, &analysisSRV);
|
||||
device->CreateRenderTargetView(resolvedTexture, &resolveRTVdesc, &resolvedRTV);
|
||||
|
||||
device->CreateTexture2D(&histogramTextureDesc, NULL, &histogramTexture);
|
||||
device->CreateTexture1D(&histogramBucketTextureDesc, NULL, &histogramRedBucketTexture);
|
||||
device->CreateTexture1D(&histogramBucketTextureDesc, NULL, &histogramGreenBucketTexture);
|
||||
device->CreateTexture1D(&histogramBucketTextureDesc, NULL, &histogramBlueBucketTexture);
|
||||
device->CreateUnorderedAccessView(histogramTexture, &histogramUAVdesc, &histogramUAV);
|
||||
device->CreateUnorderedAccessView(histogramRedBucketTexture, &histogramBucketUAVdesc, &histogramRedBucketUAV);
|
||||
device->CreateUnorderedAccessView(histogramGreenBucketTexture, &histogramBucketUAVdesc, &histogramGreenBucketUAV);
|
||||
device->CreateUnorderedAccessView(histogramBlueBucketTexture, &histogramBucketUAVdesc, &histogramBlueBucketUAV);
|
||||
device->CreateTexture2D(&histogramStagingTextureDesc, NULL, &histogramStagingTexture);
|
||||
|
||||
device->CreateTexture2D(¶deVectorScopeBucketTextureDesc, NULL, ¶deRedBucketTexture);
|
||||
device->CreateTexture2D(¶deVectorScopeBucketTextureDesc, NULL, ¶deGreenBucketTexture);
|
||||
device->CreateTexture2D(¶deVectorScopeBucketTextureDesc, NULL, ¶deBlueBucketTexture);
|
||||
device->CreateTexture2D(¶deVectorScopeBucketTextureDesc, NULL, ¶deAlphaBucketTexture);
|
||||
device->CreateTexture2D(¶deVectorScopeBucketTextureDesc, NULL, &vectorScopeBucketTexture);
|
||||
|
||||
device->CreateTexture2D(¶deTextureDesc, NULL, ¶deTexture);
|
||||
device->CreateTexture2D(¶deStagingTextureDesc, NULL, ¶deStagingTexture);
|
||||
device->CreateTexture2D(&vectorScopeTextureDesc, NULL, &vectorScopeTexture);
|
||||
device->CreateTexture2D(&vectorScopeStagingTextureDesc, NULL, &vectorScopeStagingTexture);
|
||||
|
||||
device->CreateUnorderedAccessView(paradeRedBucketTexture, ¶deVectorScopeBucketUAVdesc, ¶deRedBucketUAV);
|
||||
device->CreateUnorderedAccessView(paradeGreenBucketTexture, ¶deVectorScopeBucketUAVdesc, ¶deGreenBucketUAV);
|
||||
device->CreateUnorderedAccessView(paradeBlueBucketTexture, ¶deVectorScopeBucketUAVdesc, ¶deBlueBucketUAV);
|
||||
device->CreateUnorderedAccessView(paradeAlphaBucketTexture, ¶deVectorScopeBucketUAVdesc, ¶deAlphaBucketUAV);
|
||||
device->CreateUnorderedAccessView(vectorScopeBucketTexture, ¶deVectorScopeBucketUAVdesc, &vectorScopeBucketUAV);
|
||||
device->CreateUnorderedAccessView(vectorScopeTexture, &vectorScopeUAVdesc, &vectorScopeUAV);
|
||||
device->CreateUnorderedAccessView(paradeTexture, ¶deUAVdesc, ¶deUAV);
|
||||
|
||||
static char shaderPath[MAX_PATH];
|
||||
static char exePath[MAX_PATH];
|
||||
static char* shaderCode;
|
||||
static size_t shaderLength;
|
||||
|
||||
GetModuleFileName(NULL, exePath, MAX_PATH);
|
||||
PathRemoveFileSpec(exePath);
|
||||
|
||||
PathCombine(shaderPath, exePath, "resolve.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreatePixelShader(shaderCode, shaderLength, NULL, &psResolve);
|
||||
|
||||
PathCombine(shaderPath, exePath, "fullscreen.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateVertexShader(shaderCode, shaderLength, NULL, &vsResolve);
|
||||
|
||||
PathCombine(shaderPath, exePath, "histogramGather.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csHistogramGather);
|
||||
|
||||
PathCombine(shaderPath, exePath, "histogramMaximum.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csHistogramMaximum);
|
||||
|
||||
PathCombine(shaderPath, exePath, "histogramSpread.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csHistogramSpread);
|
||||
|
||||
PathCombine(shaderPath, exePath, "paradeVectorscopeGather.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csParadeVectorscopeGather);
|
||||
|
||||
PathCombine(shaderPath, exePath, "paradeVectorscopeMaximum.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csParadeVectorscopeMaximum);
|
||||
|
||||
PathCombine(shaderPath, exePath, "paradeVectorscopeSpread.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csParadeVectorscopeSpread);
|
||||
|
||||
PathCombine(shaderPath, exePath, "textureViewer.cso");
|
||||
ReadFile(shaderPath, &shaderCode, &shaderLength);
|
||||
device->CreateComputeShader(shaderCode, shaderLength, NULL, &csTextureViewer);
|
||||
|
||||
while (1)
|
||||
{
|
||||
auto pipeName = "\\\\.\\pipe\\8kode.error";
|
||||
hShaderErrorPipe = CreateFileA(
|
||||
pipeName, // pipe name
|
||||
GENERIC_WRITE |
|
||||
GENERIC_WRITE, // read/write access
|
||||
0, // no sharing
|
||||
NULL, // default security attributes
|
||||
OPEN_EXISTING, // opens existing pipe
|
||||
0, // default attributes
|
||||
NULL); // no template file
|
||||
|
||||
// Break if the pipe handle is valid.
|
||||
if (hShaderErrorPipe != INVALID_HANDLE_VALUE)
|
||||
break;
|
||||
|
||||
// All pipe instances are busy, so wait for 2 seconds.
|
||||
if (WaitNamedPipe(pipeName, 2000000))
|
||||
{
|
||||
printf("Could not open pipe: 2 second wait timed out.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SoundSeekToRow(void *d, int row)
|
||||
{
|
||||
if (row < 0)
|
||||
row = 0;
|
||||
|
||||
musicStartOffset = row * (long)(SAMPLES_PER_TICK);
|
||||
|
||||
WaveHDR.lpData = (LPSTR)(float*)(soundBuffer + musicStartOffset * 2);
|
||||
WaveHDR.dwBufferLength = (MAX_SAMPLES - musicStartOffset) * sizeof(float) * 2;
|
||||
|
||||
//send buffer to waveOut
|
||||
waveOutReset(hWaveOut);
|
||||
waveOutPrepareHeader(hWaveOut, &WaveHDR, sizeof(WaveHDR));
|
||||
waveOutWrite(hWaveOut, &WaveHDR, sizeof(WaveHDR));
|
||||
|
||||
//put on pause
|
||||
if (!SharedMemoryTool->AudioIsPlaying)
|
||||
waveOutPause(hWaveOut);
|
||||
}
|
||||
|
||||
void FrameworkShadersCompile();
|
||||
|
||||
void AuthoringUpdate()
|
||||
{
|
||||
SharedMemoryTool->IntroPosition = AuthoringGetIntroPosition();
|
||||
SharedMemoryTool->AudioRenderPosition = _4klang_current_tick * SAMPLES_PER_TICK;
|
||||
|
||||
if (oldAudioIsPlaying != (SharedMemoryTool->AudioIsPlaying != 0))
|
||||
{
|
||||
// Change audio play state
|
||||
if (SharedMemoryTool->AudioIsPlaying != 0)
|
||||
waveOutRestart(hWaveOut);
|
||||
else
|
||||
waveOutPause(hWaveOut);
|
||||
}
|
||||
oldAudioIsPlaying = (SharedMemoryTool->AudioIsPlaying != 0);
|
||||
|
||||
static ID3D11Buffer* empty[16];
|
||||
|
||||
context->CSSetConstantBuffers(0, 8, empty);
|
||||
context->VSSetConstantBuffers(0, 8, empty);
|
||||
context->GSSetConstantBuffers(0, 8, empty);
|
||||
context->HSSetConstantBuffers(0, 8, empty);
|
||||
context->DSSetConstantBuffers(0, 8, empty);
|
||||
context->PSSetConstantBuffers(0, 8, empty);
|
||||
|
||||
context->RSSetViewports(1, &swapChainViewport);
|
||||
context->OMSetRenderTargets(1, &resolvedRTV, nullptr);
|
||||
context->PSSetShaderResources(0, 1, &backBufferSRV);
|
||||
context->PSSetShader(psResolve, nullptr, 0);
|
||||
context->VSSetShader(vsResolve, nullptr, 0);
|
||||
context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
|
||||
context->Draw(4, 0);
|
||||
context->PSSetShaderResources(0, 1, (ID3D11ShaderResourceView* const*)empty);
|
||||
context->OMSetRenderTargets(1, (ID3D11RenderTargetView* const*)empty, nullptr);
|
||||
|
||||
context->CopyResource(stagingTexture, resolvedTexture);
|
||||
context->Map(stagingTexture, 0, D3D11_MAP_READ, 0, &mappedResource);
|
||||
auto srcPtr = (char*)mappedResource.pData;
|
||||
auto dstPtr = SharedImage;
|
||||
auto endImgPtr = srcPtr + SCREENWIDTH * SCREENHEIGHT * 4;
|
||||
memcpy(SharedImage, mappedResource.pData, SCREENWIDTH * SCREENHEIGHT * 4);
|
||||
context->Unmap(stagingTexture, 0);
|
||||
|
||||
static ID3D11UnorderedAccessView* histogramUAVs[] =
|
||||
{
|
||||
0,
|
||||
histogramRedBucketUAV,
|
||||
histogramGreenBucketUAV,
|
||||
histogramBlueBucketUAV,
|
||||
histogramUAV,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
static ID3D11UnorderedAccessView* paradeVectorscopeUAVs[] =
|
||||
{
|
||||
0,
|
||||
paradeRedBucketUAV,
|
||||
paradeGreenBucketUAV,
|
||||
paradeBlueBucketUAV,
|
||||
paradeAlphaBucketUAV,
|
||||
vectorScopeBucketUAV,
|
||||
paradeUAV,
|
||||
vectorScopeUAV
|
||||
};
|
||||
|
||||
static UINT zero[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
context->ClearUnorderedAccessViewUint(histogramRedBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(histogramGreenBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(histogramBlueBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(vectorScopeBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(paradeRedBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(paradeGreenBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(paradeBlueBucketUAV, zero);
|
||||
context->ClearUnorderedAccessViewUint(paradeAlphaBucketUAV, zero);
|
||||
|
||||
context->CSSetShaderResources(0, 1, &analysisSRV);
|
||||
|
||||
context->OMSetRenderTargets(1, (ID3D11RenderTargetView* const *)zero, NULL);
|
||||
context->CSSetUnorderedAccessViews(0, 8, histogramUAVs, NULL);
|
||||
context->CSSetShader(csHistogramGather, NULL, 0);
|
||||
context->Dispatch(SCREENWIDTH / 16, SCREENHEIGHT / 16, 1);
|
||||
context->CSSetShader(csHistogramMaximum, NULL, 0);
|
||||
context->Dispatch(16, 1, 1);
|
||||
context->CSSetShader(csHistogramSpread, NULL, 0);
|
||||
context->Dispatch(16, 16, 1);
|
||||
|
||||
context->CSSetUnorderedAccessViews(0, 8, paradeVectorscopeUAVs, NULL);
|
||||
context->CSSetShader(csParadeVectorscopeGather, NULL, 0);
|
||||
context->Dispatch(SCREENWIDTH / 16, SCREENHEIGHT / 16, 1);
|
||||
context->CSSetShader(csParadeVectorscopeMaximum, NULL, 0);
|
||||
context->Dispatch(16, 16, 1);
|
||||
context->CSSetShader(csParadeVectorscopeSpread, NULL, 0);
|
||||
context->Dispatch(16, 16, 1);
|
||||
|
||||
context->CSSetShaderResources(0, 1, (ID3D11ShaderResourceView* const*)zero);
|
||||
context->CSSetUnorderedAccessViews(0, 8, (ID3D11UnorderedAccessView* const *)zero, NULL);
|
||||
|
||||
context->CopyResource(histogramStagingTexture, histogramTexture);
|
||||
context->Map(histogramStagingTexture, 0, D3D11_MAP_READ, 0, &mappedResource);
|
||||
memcpy(histogram, mappedResource.pData, 4 * 256 * 256);
|
||||
context->Unmap(histogramStagingTexture, 0);
|
||||
|
||||
context->CopyResource(paradeStagingTexture, paradeTexture);
|
||||
context->Map(paradeStagingTexture, 0, D3D11_MAP_READ, 0, &mappedResource);
|
||||
memcpy(parade, mappedResource.pData, 4 * 4 * 256 * 256);
|
||||
context->Unmap(paradeStagingTexture, 0);
|
||||
|
||||
context->CopyResource(vectorScopeStagingTexture, vectorScopeTexture);
|
||||
context->Map(vectorScopeStagingTexture, 0, D3D11_MAP_READ, 0, &mappedResource);
|
||||
memcpy(vectorscope, mappedResource.pData, 4 * 256 * 256);
|
||||
context->Unmap(vectorScopeStagingTexture, 0);
|
||||
|
||||
if (SharedMemoryTool->SeekToRow >= 0)
|
||||
{
|
||||
auto row = SharedMemoryTool->SeekToRow;
|
||||
SharedMemoryTool->SeekToRow = -1;
|
||||
SoundSeekToRow(NULL, row);
|
||||
}
|
||||
|
||||
if (SharedMemoryTool->DisplayTextureIndex >= 0)
|
||||
{
|
||||
int i = 0;
|
||||
for (auto texture : textureMap)
|
||||
{
|
||||
if (i++ != SharedMemoryTool->DisplayTextureIndex)
|
||||
continue;
|
||||
|
||||
texture.second->TEX->GetDesc(&displayDesc);
|
||||
displayDesc.Format = DXGI_FORMAT_R8G8B8A8_UINT;
|
||||
displayDesc.MipLevels = 1;
|
||||
displayDesc.BindFlags |= D3D11_BIND_UNORDERED_ACCESS;
|
||||
device->CreateTexture2D(&displayDesc, NULL, &displayRGBTexture);
|
||||
device->CreateTexture2D(&displayDesc, NULL, &displayATexture);
|
||||
displayDesc.Usage = D3D11_USAGE_STAGING;
|
||||
displayDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
|
||||
displayDesc.BindFlags = 0;
|
||||
displayDesc.MiscFlags = 0;
|
||||
device->CreateTexture2D(&displayDesc, NULL, &displayStagingTexture);
|
||||
device->CreateUnorderedAccessView(displayRGBTexture, NULL, &displayRGBUAV);
|
||||
device->CreateUnorderedAccessView(displayATexture, NULL, &displayAUAV);
|
||||
|
||||
context->CSSetShaderResources(0, 1, &texture.second->SRV);
|
||||
context->CSSetUnorderedAccessViews(1, 1, &displayRGBUAV, NULL);
|
||||
context->CSSetUnorderedAccessViews(2, 1, &displayAUAV, NULL);
|
||||
context->CSSetShader(csTextureViewer, NULL, 0);
|
||||
context->Dispatch(displayDesc.Width / 16, displayDesc.Height / 16, 1);
|
||||
context->CSSetUnorderedAccessViews(0, 3, (ID3D11UnorderedAccessView* const *)zero, NULL);
|
||||
context->CSSetShaderResources(0, 1, (ID3D11ShaderResourceView* const *)zero);
|
||||
|
||||
context->CopyResource(displayStagingTexture, displayRGBTexture);
|
||||
context->Map(displayStagingTexture, 0, D3D11_MAP_READ, 0, &mappedResource);
|
||||
auto pData = displayTextureData + 1;
|
||||
*(UINT*)(pData) = displayDesc.Width;
|
||||
pData += sizeof(UINT);
|
||||
*(UINT*)(pData) = displayDesc.Height;
|
||||
pData += sizeof(UINT);
|
||||
memcpy(pData, mappedResource.pData, mappedResource.RowPitch * displayDesc.Height);
|
||||
pData += mappedResource.RowPitch * displayDesc.Height;
|
||||
context->Unmap(displayStagingTexture, 0);
|
||||
|
||||
context->CopyResource(displayStagingTexture, displayATexture);
|
||||
context->Map(displayStagingTexture, 0, D3D11_MAP_READ, 0, &mappedResource);
|
||||
memcpy(pData, mappedResource.pData, mappedResource.RowPitch * displayDesc.Height);
|
||||
context->Unmap(displayStagingTexture, 0);
|
||||
|
||||
displayTextureData[0] = SharedMemoryTool->DisplayTextureIndex;
|
||||
displayStagingTexture->Release();
|
||||
displayRGBTexture->Release();
|
||||
displayATexture->Release();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AuthoringDispose()
|
||||
{
|
||||
Log("AuthoringDispose");
|
||||
|
||||
UnmapViewOfFile(SharedMemoryTool);
|
||||
UnmapViewOfFile(SharedImage);
|
||||
UnmapViewOfFile(histogram);
|
||||
UnmapViewOfFile(parade);
|
||||
UnmapViewOfFile(vectorscope);
|
||||
UnmapViewOfFile(syncDataAudio);
|
||||
UnmapViewOfFile(syncOverrideData);
|
||||
UnmapViewOfFile(displayTextureData);
|
||||
|
||||
CloseHandle(SharedMemoryFileMapping);
|
||||
CloseHandle(AudioFileMapping);
|
||||
CloseHandle(ImageFileMapping);
|
||||
CloseHandle(HistogramFileMapping);
|
||||
CloseHandle(ParadeFileMapping);
|
||||
CloseHandle(VectorscopeFileMapping);
|
||||
CloseHandle(SyncDataFileMapping);
|
||||
CloseHandle(SyncOverrideDataFileMapping);
|
||||
CloseHandle(DisplayTextureFileMapping);
|
||||
}
|
||||
543
netpoet-coop-8k/src/intro/framework/codegen/intro_hlsl.g.h
Normal file
543
netpoet-coop-8k/src/intro/framework/codegen/intro_hlsl.g.h
Normal file
@@ -0,0 +1,543 @@
|
||||
/* File generated with Shader Minifier 1.1.3
|
||||
* http://www.ctrl-alt-test.fr
|
||||
*/
|
||||
#ifndef INTRO_HLSL_G_H_
|
||||
# define INTRO_HLSL_G_H_
|
||||
|
||||
char merged_hlsl[] =
|
||||
"cbuffer CB:register(b0){float3 oldCamPos;float iTime;float3 oldCamAt;float oTime;uint iFrame;float oldCamRoll;uint _a;uint _b;};struct Audio{float3 ConePos;float ConeOpening;float3 ConeDir;float ConeIntensity;float3 ConeColor;float camRoll;float3 Point1Pos;float Point1Radius;float3 Point1Color;float Point1Intensity;float3 Point2Pos;float Point2Radius;float3 Point2Color;float Point2Intensity;float3 Line1Start;float Line1Intensity;float3 Line1End;float Line1Radius;float3 Line1Color;float SizeX;float3 Line2Start;float Line2Intensity;float3 Line2End;float Line2Radius;float3 Line2Color;float SizeY;float3 Line3Start;float Line3Intensity;float3 Line3End;float Line3Radius;float3 Line3Color;float ThicknessY;float3 camPos;float AnimX;float3 camAt;float AnimY;float3 PosX;float camFade;float3 PosY;float _b;float3 RotAxisX;float RotAngleX;float3 RotAxisY;float RotAngleY;};cbuffer CA:register(b1){Audio audio;};RWTexture2D<float4> o0:register(u0);"
|
||||
"RWTexture2DArray<float> oNoise:register(u1);"
|
||||
"Texture2D<float4> lastFrame:register(t0);"
|
||||
"[numthreads(8,8,4)]"
|
||||
"void cs_BlueNoise(uint3 i:SV_DispatchThreadID)"
|
||||
"{"
|
||||
"int2 p=i.xy+i.z*int2(113,127);"
|
||||
"int level=19,d=0;"
|
||||
"for(int k=0;k<level;k++)"
|
||||
"{"
|
||||
"int n=level-k-1;"
|
||||
"int2 r=p>>n&1;"
|
||||
"d+=(3*r.x^r.y)<<2*n;"
|
||||
"if(r.y==0)"
|
||||
"{"
|
||||
"if(r.x==1)"
|
||||
"{"
|
||||
"p=(1<<n)-1-p;"
|
||||
"}"
|
||||
"p=p.yx;"
|
||||
"}"
|
||||
"}"
|
||||
"oNoise[i]=float(-2147483648u+2654435789u*(uint(d)%(1u<<level))>>24)/256;"
|
||||
"}"
|
||||
"float3 linear_srgb(float3 x)"
|
||||
"{"
|
||||
"return lerp(1.055*pow(x,1/2.4)-.055,12.92*x,step(x,.0031308));"
|
||||
"}"
|
||||
"static const float3x3 AP1_2_XYZ_MAT={.6624541811,.1340042065,.156187687,.2722287168,.6740817658,.0536895174,-.0055746495,.0040607335,1.0103391003},XYZ_2_AP1_MAT={1.6410233797,-.3248032942,-.2364246952,-.6636628587,1.6153315917,.0167563477,.0117218943,-.008284442,.9883948585},D60_2_D65_CAT={.987224,-.00611327,.0159533,-.00759836,1.00186,.0053302,.00307257,-.00509595,1.08168},XYZ_2_REC2020_MAT={1.716651188,-.3556707838,-.2533662814,-.6666843518,1.6164812366,.0157685458,.0176398574,-.0427706133,.9421031212};"
|
||||
"static const float SATURATION=1.2,EXPOSURE=1.2;"
|
||||
"float3 ToneMap(float3 color)"
|
||||
"{"
|
||||
"float3 v=max(0,mul(float3x3(.59719,.35458,.04823,.076,.90834,.01566,.0284,.13383,.83777),color*EXPOSURE)),a=v*(v+.0245786f)-9.0537E-05f,b=v*(.983729f*v+.432951f)+.238081f;"
|
||||
"color=a/b;"
|
||||
"color=lerp(dot(color,float3(.272229,.674082,.0536895)),color,SATURATION);"
|
||||
"color=mul(AP1_2_XYZ_MAT,color);"
|
||||
"color=mul(D60_2_D65_CAT,color);"
|
||||
"color=mul(XYZ_2_REC2020_MAT,color);"
|
||||
"return linear_srgb(max(0,color));"
|
||||
"}"
|
||||
"float dot2(in float2 v)"
|
||||
"{"
|
||||
"return dot(v,v);"
|
||||
"}"
|
||||
"float dot2(in float3 v)"
|
||||
"{"
|
||||
"return dot(v,v);"
|
||||
"}"
|
||||
"float ndot(in float2 a,in float2 b)"
|
||||
"{"
|
||||
"return a.x*b.x-a.y*b.y;"
|
||||
"}"
|
||||
"float sdPlane(float3 p)"
|
||||
"{"
|
||||
"return p.y;"
|
||||
"}"
|
||||
"float sdSphere(float3 p,float s)"
|
||||
"{"
|
||||
"return length(p)-s;"
|
||||
"}"
|
||||
"float sdTetrahedron(float3 p,float e)"
|
||||
"{"
|
||||
"return(max(abs(p.x+p.y)-p.z,abs(p.x-p.y)+p.z)-e)/sqrt(3);"
|
||||
"}"
|
||||
"float sdBox(float3 p,float3 b)"
|
||||
"{"
|
||||
"float3 d=abs(p)-b;"
|
||||
"return min(max(d.x,max(d.y,d.z)),0)+length(max(d,0));"
|
||||
"}"
|
||||
"float sdBoxFrame(float3 p,float3 b,float e)"
|
||||
"{"
|
||||
"p=abs(p)-b;"
|
||||
"float3 q=abs(p+e)-e;"
|
||||
"return min(min(length(max(float3(p.x,q.y,q.z),0))+min(max(p.x,max(q.y,q.z)),0),length(max(float3(q.x,p.y,q.z),0))+min(max(q.x,max(p.y,q.z)),0)),length(max(float3(q.x,q.y,p.z),0))+min(max(q.x,max(q.y,p.z)),0));"
|
||||
"}"
|
||||
"float sdEllipsoid(in float3 p,in float3 r)"
|
||||
"{"
|
||||
"float k0=length(p/r),k1=length(p/(r*r));"
|
||||
"return k0*(k0-1)/k1;"
|
||||
"}"
|
||||
"float sdTorus(float3 p,float2 t)"
|
||||
"{"
|
||||
"return length(float2(length(p.xz)-t.x,p.y))-t.y;"
|
||||
"}"
|
||||
"float sdCappedTorus(in float3 p,in float2 sc,in float ra,in float rb)"
|
||||
"{"
|
||||
"p.x=abs(p.x);"
|
||||
"float k=sc.y*p.x>sc.x*p.y?dot(p.xy,sc):length(p.xy);"
|
||||
"return sqrt(dot(p,p)+ra*ra-2*ra*k)-rb;"
|
||||
"}"
|
||||
"float sdHexPrism(float3 p,float2 h)"
|
||||
"{"
|
||||
"float3 q=abs(p);"
|
||||
"const float3 k=float3(-.8660254,.5,.57735);"
|
||||
"p=abs(p);"
|
||||
"p.xy-=2*min(dot(k.xy,p.xy),0)*k.xy;"
|
||||
"float2 d=float2(length(p.xy-float2(clamp(p.x,-k.z*h.x,k.z*h.x),h.x))*sign(p.y-h.x),p.z-h.y);"
|
||||
"return min(max(d.x,d.y),0)+length(max(d,0));"
|
||||
"}"
|
||||
"float sdOctogonPrism(in float3 p,in float r,float h)"
|
||||
"{"
|
||||
"const float3 k=float3(-.9238795325,.3826834323,.4142135623);"
|
||||
"p=abs(p);"
|
||||
"p.xy-=2*min(dot(float2(k.x,k.y),p.xy),0)*float2(k.x,k.y);"
|
||||
"p.xy-=2*min(dot(float2(-k.x,k.y),p.xy),0)*float2(-k.x,k.y);"
|
||||
"p.xy-=float2(clamp(p.x,-k.z*r,k.z*r),r);"
|
||||
"float2 d=float2(length(p.xy)*sign(p.y),p.z-h);"
|
||||
"return min(max(d.x,d.y),0)+length(max(d,0));"
|
||||
"}"
|
||||
"float sdCapsule(float3 p,float3 a,float3 b,float r)"
|
||||
"{"
|
||||
"float3 pa=p-a,ba=b-a;"
|
||||
"float h=clamp(dot(pa,ba)/dot(ba,ba),0,1);"
|
||||
"return length(pa-ba*h)-r;"
|
||||
"}"
|
||||
"float sdTriPrism(float3 p,float2 h)"
|
||||
"{"
|
||||
"const float k=sqrt(3);"
|
||||
"h.x*=.5*k;"
|
||||
"p.xy/=h.x;"
|
||||
"p.x=abs(p.x)-1;"
|
||||
"p.y=p.y+1/k;"
|
||||
"if(p.x+k*p.y>0)"
|
||||
"p.xy=float2(p.x-k*p.y,-k*p.x-p.y)/2;"
|
||||
"p.x-=clamp(p.x,-2,0);"
|
||||
"float d1=length(p.xy)*sign(-p.y)*h.x,d2=abs(p.z)-h.y;"
|
||||
"return length(max(float2(d1,d2),0))+min(max(d1,d2),0);"
|
||||
"}"
|
||||
"float sdCylinder(float3 p,float2 h)"
|
||||
"{"
|
||||
"float2 d=abs(float2(length(p.xz),p.y))-h;"
|
||||
"return min(max(d.x,d.y),0)+length(max(d,0));"
|
||||
"}"
|
||||
"float sdCylinder(float3 p,float3 a,float3 b,float r)"
|
||||
"{"
|
||||
"float3 pa=p-a,ba=b-a;"
|
||||
"float baba=dot(ba,ba),paba=dot(pa,ba),x=length(pa*baba-ba*paba)-r*baba,y=abs(paba-baba*.5)-baba*.5,x2=x*x,y2=y*y*baba,d=max(x,y)<0?-min(x2,y2):(x>0?x2:0)+(y>0?y2:0);"
|
||||
"return sign(d)*sqrt(abs(d))/baba;"
|
||||
"}"
|
||||
"float sdCone(in float3 p,in float2 c,float h)"
|
||||
"{"
|
||||
"float2 q=h*float2(c.x,-c.y)/c.y,w=float2(length(p.xz),p.y),a=w-q*clamp(dot(w,q)/dot(q,q),0,1),b=w-q*float2(clamp(w.x/q.x,0,1),1);"
|
||||
"float k=sign(q.y),d=min(dot(a,a),dot(b,b)),s=max(k*(w.x*q.y-w.y*q.x),k*(w.y-q.y));"
|
||||
"return sqrt(d)*sign(s);"
|
||||
"}"
|
||||
"float sdCone(in float3 p,in float3 c)"
|
||||
"{"
|
||||
"float2 q=float2(length(p.xy),p.z);"
|
||||
"float d1=-q.x-c.z,d2=max(dot(q,c.xy),q.y);"
|
||||
"return length(max(float2(d1,d2),0))+min(max(d1,d2),0);"
|
||||
"}"
|
||||
"float sdCappedCone(in float3 p,in float h,in float r1,in float r2)"
|
||||
"{"
|
||||
"float2 q=float2(length(p.xz),p.y),k1=float2(r2,h),k2=float2(r2-r1,2*h),ca=float2(q.x-min(q.x,q.y<0?r1:r2),abs(q.y)-h),cb=q-k1+k2*clamp(dot(k1-q,k2)/dot2(k2),0,1);"
|
||||
"float s=cb.x<0&&ca.y<0?-1:1;"
|
||||
"return s*sqrt(min(dot2(ca),dot2(cb)));"
|
||||
"}"
|
||||
"float sdCappedCone(float3 p,float3 a,float3 b,float ra,float rb)"
|
||||
"{"
|
||||
"float rba=rb-ra,baba=dot(b-a,b-a),papa=dot(p-a,p-a),paba=dot(p-a,b-a)/baba,x=sqrt(papa-paba*paba*baba),cax=max(0,x-(paba<.5?ra:rb)),cay=abs(paba-.5)-.5,k=rba*rba+baba,f=clamp((rba*(x-ra)+paba*baba)/k,0,1),cbx=x-ra-f*rba,cby=paba-f,s=cbx<0&&cay<0?-1:1;"
|
||||
"return s*sqrt(min(cax*cax+cay*cay*baba,cbx*cbx+cby*cby*baba));"
|
||||
"}"
|
||||
"float sdSolidAngle(float3 pos,float2 c,float ra)"
|
||||
"{"
|
||||
"float2 p=float2(length(pos.xz),pos.y);"
|
||||
"float l=length(p)-ra,m=length(p-c*clamp(dot(p,c),0,ra));"
|
||||
"return max(l,m*sign(c.y*p.x-c.x*p.y));"
|
||||
"}"
|
||||
"float sdPyramid(in float3 p,in float h)"
|
||||
"{"
|
||||
"float m2=h*h+.25;"
|
||||
"p.xz=abs(p.xz);"
|
||||
"p.xz=p.z>p.x?p.zx:p.xz;"
|
||||
"p.xz-=.5;"
|
||||
"float3 q=float3(p.z,h*p.y-.5*p.x,h*p.x+.5*p.y);"
|
||||
"float s=max(-q.x,0),t=clamp((q.y-.5*p.z)/(m2+.25),0,1),a=m2*(q.x+s)*(q.x+s)+q.y*q.y,b=m2*(q.x+.5*t)*(q.x+.5*t)+(q.y-m2*t)*(q.y-m2*t),d2=min(q.y,-q.x*m2-q.y*.5)>0?0:min(a,b);"
|
||||
"return sqrt((d2+q.z*q.z)/m2)*sign(max(q.z,-p.y));"
|
||||
"}"
|
||||
"float sdRhombus(float3 p,float la,float lb,float h,float ra)"
|
||||
"{"
|
||||
"p=abs(p);"
|
||||
"float2 b=float2(la,lb);"
|
||||
"float f=clamp(ndot(b,b-2*p.xz)/dot(b,b),-1,1);"
|
||||
"float2 q=float2(length(p.xz-.5*b*float2(1-f,1+f))*sign(p.x*b.y+p.z*b.x-b.x*b.y)-ra,p.y-h);"
|
||||
"return min(max(q.x,q.y),0)+length(max(q,0));"
|
||||
"}"
|
||||
"float sdHorseshoe(in float3 p,in float2 c,in float r,in float le,float2 w)"
|
||||
"{"
|
||||
"p.x=abs(p.x);"
|
||||
"float l=length(p.xy);"
|
||||
"p.xy=mul(p.xy,float2x2(-c.x,c.y,c.y,c.x));"
|
||||
"p.xy=float2(p.y>0||p.x>0?p.x:l*sign(-c.x),p.x>0?p.y:l);"
|
||||
"p.xy=float2(p.x,abs(p.y-r))-float2(le,0);"
|
||||
"float2 q=float2(length(max(p.xy,0))+min(0,max(p.x,p.y)),p.z),d=abs(q)-w;"
|
||||
"return min(max(d.x,d.y),0)+length(max(d,0));"
|
||||
"}"
|
||||
"float sdU(in float3 p,in float r,in float le,float2 w)"
|
||||
"{"
|
||||
"p.x=p.y>0?abs(p.x):length(p.xy);"
|
||||
"p.x=abs(p.x-r);"
|
||||
"p.y=p.y-le;"
|
||||
"float k=max(p.x,p.y);"
|
||||
"float2 q=float2(k<0?-k:length(max(p.xy,0)),abs(p.z))-w;"
|
||||
"return length(max(q,0))+min(max(q.x,q.y),0);"
|
||||
"}"
|
||||
"float2 opU(float2 d1,float2 d2)"
|
||||
"{"
|
||||
"return d1.x<d2.x?d1:d2;"
|
||||
"}"
|
||||
"void pR(inout float2 p,float a)"
|
||||
"{"
|
||||
"p=cos(a)*p+sin(a)*float2(p.y,-p.x);"
|
||||
"}"
|
||||
"float4 qmul(float4 q1,float4 q2)"
|
||||
"{"
|
||||
"return float4(q2.xyz*q1.w+q1.xyz*q2.w+cross(q1.xyz,q2.xyz),q1.w*q2.w-dot(q1.xyz,q2.xyz));"
|
||||
"}"
|
||||
"void pR(inout float3 v,float4 r)"
|
||||
"{"
|
||||
"v=qmul(r,qmul(float4(v,0),r*float4(-1,-1,-1,1))).xyz;"
|
||||
"}"
|
||||
"float4 quaternion(float3 axis,float angle)"
|
||||
"{"
|
||||
"float2 sc;"
|
||||
"sincos(angle,sc.x,sc.y);"
|
||||
"return float4(normalize(axis)*sc.x,sc.y);"
|
||||
"}"
|
||||
"void taa(inout float3 old,in float2 id,int2 iResolution)"
|
||||
"{"
|
||||
"id*=iResolution;"
|
||||
"id+=.5;"
|
||||
"if(any(id<=1)||any(id>=iResolution-1))"
|
||||
"return;"
|
||||
"float3 center=lastFrame[id].xyz,minColor=center,maxColor=center;"
|
||||
"for(int iy=-1;iy<=1;++iy)"
|
||||
"{"
|
||||
"for(int ix=-1;ix<=1;++ix)"
|
||||
"{"
|
||||
"if(ix==0&&iy==0)"
|
||||
"continue;"
|
||||
"float3 color=lastFrame[id+int2(ix,iy)].xyz;"
|
||||
"minColor=min(minColor,color);"
|
||||
"maxColor=max(maxColor,color);"
|
||||
"}"
|
||||
"}"
|
||||
"old=lerp(old,center,.4);"
|
||||
"}"
|
||||
"static const float MAT_LASER1=3,MAT_LASER2=4,MAT_LASER3=5,MAT_POINT1=6,MAT_POINT2=7,MAT_SPOTLIGHT=8,MAT_OBJ=20,MAT_PRISM=21;"
|
||||
"float obj(in float3 pos)"
|
||||
"{"
|
||||
"pR(pos,quaternion(audio.RotAxisX,audio.RotAngleX));"
|
||||
"pR(pos.xy,.608);"
|
||||
"pR(pos.zy,.7934);"
|
||||
"pos-=audio.PosX;"
|
||||
"return sdTetrahedron(pos,audio.SizeX);"
|
||||
"}"
|
||||
"float prism(in float3 pos)"
|
||||
"{"
|
||||
"pR(pos,quaternion(audio.RotAxisY,audio.RotAngleY));"
|
||||
"pos-=audio.PosY;"
|
||||
"return sdTriPrism(pos,float2(audio.SizeY,audio.ThicknessY))-.01;"
|
||||
"}"
|
||||
"float2 map(in float3 pos)"
|
||||
"{"
|
||||
"float2 res=float2(pos.y,0);"
|
||||
"res=opU(res,float2(obj(pos),MAT_OBJ));"
|
||||
"res=opU(res,float2(prism(pos),MAT_PRISM));"
|
||||
"return res;"
|
||||
"}"
|
||||
"float calcSoftshadow(in float3 ro,in float3 rd,in float mint,in float tmax,in float bluenoise)"
|
||||
"{"
|
||||
"float res=1,t=mint;"
|
||||
"t+=(.5+bluenoise)*.1;"
|
||||
"for(int i=0;i<16;i++)"
|
||||
"{"
|
||||
"float h=map(ro+rd*saturate(t)).x;"
|
||||
"res=min(res,8*h/t);"
|
||||
"t+=clamp(h,.02,.3);"
|
||||
"if(h<.005||t>tmax)"
|
||||
"break;"
|
||||
"}"
|
||||
"return clamp(res,0,1);"
|
||||
"}"
|
||||
"void laser(inout float2 h,inout float3 p,in float3 start,in float3 end,in float radius,in float bluenoise,in float3 color,in float intensity,in float mat,inout float3 scatter)"
|
||||
"{"
|
||||
"if(intensity<=0)"
|
||||
"return;"
|
||||
"h=opU(h,float2(sdCapsule(p,start,end,radius*.01*intensity),mat));"
|
||||
"float s=sdCapsule(p,start,end,radius);"
|
||||
"if(s<0)"
|
||||
"{"
|
||||
"float3 ld=normalize(end-start);"
|
||||
"float proj=dot(p-start,ld);"
|
||||
"float3 lp=start+ld*proj;"
|
||||
"float len=max(length(lp-p),length(end-p)),shadow=1;"
|
||||
"scatter+=color*-s*intensity*.1*shadow/(len*len);"
|
||||
"s=.1;"
|
||||
"}"
|
||||
"else"
|
||||
" s=max(s,.1+(.5+bluenoise)*.1*radius*intensity);"
|
||||
"h.x=min(h.x,s);"
|
||||
"}"
|
||||
"void torch(inout float2 h,inout float3 p,in float3 start,in float3 end,in float radius,in float bluenoise,in float3 color,in float intensity,in float mat,inout float3 scatter)"
|
||||
"{"
|
||||
"if(intensity<=0)"
|
||||
"return;"
|
||||
"h=opU(h,float2(sdSphere(p-start-.1*normalize(end-start),.03),mat));"
|
||||
"float s=sdCappedCone(p,start,end,0,radius);"
|
||||
"if(s<0)"
|
||||
"{"
|
||||
"float3 ld=start-p;"
|
||||
"float len=length(ld),shadow=calcSoftshadow(p,normalize(ld),.01,len,bluenoise);"
|
||||
"scatter+=color*-s*intensity*.5*shadow/(len*len);"
|
||||
"s=.1;"
|
||||
"}"
|
||||
"else"
|
||||
" s=max(s,.1+(.5+bluenoise)*.1*radius*intensity);"
|
||||
"h.x=min(h.x,s);"
|
||||
"}"
|
||||
"void lantern(inout float2 h,inout float3 p,in float3 pos,in float radius,in float bluenoise,in float3 color,in float intensity,in float mat,inout float3 scatter)"
|
||||
"{"
|
||||
"if(intensity<=0)"
|
||||
"return;"
|
||||
"h=opU(h,float2(sdSphere(p-pos,radius*.01),mat));"
|
||||
"float s=sdSphere(p-pos,radius);"
|
||||
"if(s<0)"
|
||||
"{"
|
||||
"float3 ld=pos-p;"
|
||||
"float len=length(ld),shadow=calcSoftshadow(p,normalize(ld),.01,len,bluenoise);"
|
||||
"scatter+=color*-s*intensity*.01*shadow/(len*len);"
|
||||
"s=.1;"
|
||||
"}"
|
||||
"else"
|
||||
" s=max(s,.1+(.5+bluenoise)*.1*radius*intensity);"
|
||||
"h.x=min(h.x,s);"
|
||||
"}"
|
||||
"float2 raycast(in float3 ro,in float3 rd,in float bluenoise,out float3 scatter)"
|
||||
"{"
|
||||
"float2 res=float2(-1,-1);"
|
||||
"float tmin=0,tmax=20;"
|
||||
"float3 coneDir=normalize(audio.ConeDir);"
|
||||
"float tp2=-audio.ConePos.y/coneDir.y;"
|
||||
"float3 coneTarget=audio.ConePos+coneDir;"
|
||||
"if(tp2>0)"
|
||||
"{"
|
||||
"tp2*=10;"
|
||||
"coneTarget=audio.ConePos+tp2*coneDir;"
|
||||
"}"
|
||||
"float coneRadius=tp2*tan(asin(audio.ConeOpening));"
|
||||
"tmin-=(.5+bluenoise)*.5;"
|
||||
"float t=tmin;"
|
||||
"float3 p=ro,line1Target=audio.Line1End,ld=normalize(line1Target-audio.Line1Start);"
|
||||
"for(int j=0;j<24;j++)"
|
||||
"{"
|
||||
"float2 h=map(p=audio.Line1Start+ld*t);"
|
||||
"if(abs(h.x)<.01*t)"
|
||||
"{"
|
||||
"line1Target=p;"
|
||||
"break;"
|
||||
"}"
|
||||
"t+=h.x;"
|
||||
"}"
|
||||
"t=tmin;"
|
||||
"scatter=0;"
|
||||
"for(int i=0;i<150&&t<tmax;i++)"
|
||||
"{"
|
||||
"float2 h=map(p=ro+rd*t);"
|
||||
"laser(h,p,audio.Line1Start,line1Target,audio.Line1Radius,bluenoise,audio.Line1Color,audio.Line1Intensity,MAT_LASER1,scatter);"
|
||||
"laser(h,p,audio.Line2Start,audio.Line2End,audio.Line2Radius,bluenoise,audio.Line2Color,audio.Line2Intensity,MAT_LASER2,scatter);"
|
||||
"laser(h,p,audio.Line3Start,audio.Line3End,audio.Line3Radius,bluenoise,audio.Line3Color,audio.Line3Intensity,MAT_LASER3,scatter);"
|
||||
"lantern(h,p,audio.Point1Pos,audio.Point1Radius,bluenoise,audio.Point1Color,audio.Point1Intensity,MAT_POINT1,scatter);"
|
||||
"lantern(h,p,audio.Point2Pos,audio.Point2Radius,bluenoise,audio.Point2Color,audio.Point2Intensity,MAT_POINT2,scatter);"
|
||||
"torch(h,p,audio.ConePos,coneTarget,coneRadius,bluenoise,audio.ConeColor,audio.ConeIntensity,MAT_SPOTLIGHT,scatter);"
|
||||
"if(abs(h.x)<.001*t)"
|
||||
"{"
|
||||
"res=float2(t,h.y);"
|
||||
"break;"
|
||||
"}"
|
||||
"t+=h.x;"
|
||||
"}"
|
||||
"return res;"
|
||||
"}"
|
||||
"float3 calcNormal(in float3 pos)"
|
||||
"{"
|
||||
"float3 n=0;"
|
||||
"for(int i=min(iFrame,0);i<4;i++)"
|
||||
"{"
|
||||
"float3 e=float3(i+3>>1&1,i>>1,i&1)-.5;"
|
||||
"n+=e*map(pos+.005*e).x;"
|
||||
"}"
|
||||
"return normalize(n);"
|
||||
"}"
|
||||
"float calcAO(in float3 pos,in float3 nor)"
|
||||
"{"
|
||||
"float occ=0,sca=1;"
|
||||
"for(int i=0;i<5;i++)"
|
||||
"{"
|
||||
"float h=.01+.12*float(i)/4,d=map(pos+h*nor).x;"
|
||||
"occ+=(h-d)*sca;"
|
||||
"sca*=.95;"
|
||||
"if(occ>.35)"
|
||||
"break;"
|
||||
"}"
|
||||
"return clamp(1-3*occ,0,1)*(.5+.5*nor.y);"
|
||||
"}"
|
||||
"float checkersGradBox(in float2 p)"
|
||||
"{"
|
||||
"float2 w=.001,i=2*(abs(frac((p-.5*w)*.5)-.5)-abs(frac((p+.5*w)*.5)-.5))/w;"
|
||||
"return.5-.5*i.x*i.y;"
|
||||
"}"
|
||||
"bool render(in float3 ro,in float3 rd,in float bluenoise,out float3 pos,out float3 nor,inout float3 color,out float3 q)"
|
||||
"{"
|
||||
"float3 background=.01,col=background;"
|
||||
"nor=0;"
|
||||
"float3 scatter;"
|
||||
"float2 res=raycast(ro,rd,bluenoise,scatter);"
|
||||
"float t=res.x,m=res.y;"
|
||||
"bool refl=false;"
|
||||
"pos=q=ro;"
|
||||
"if(m>=0)"
|
||||
"{"
|
||||
"pos+=t*rd;"
|
||||
"nor=m<1.5?float3(0,1,0):calcNormal(pos);"
|
||||
"if(m<1.5)"
|
||||
"{"
|
||||
"float f=checkersGradBox(3*pos.xz);"
|
||||
"col=.15+f*.05;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_OBJ)"
|
||||
"{"
|
||||
"col=1;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_LASER1)"
|
||||
"{"
|
||||
"col=max(1,100*audio.Line1Intensity)*audio.Line1Color;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_LASER2)"
|
||||
"{"
|
||||
"col=max(1,100*audio.Line2Intensity)*audio.Line2Color;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_LASER3)"
|
||||
"{"
|
||||
"col=max(1,100*audio.Line3Intensity)*audio.Line3Color;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_POINT1)"
|
||||
"{"
|
||||
"col=50*audio.Point1Intensity*audio.Point1Color;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_POINT2)"
|
||||
"{"
|
||||
"col=50*audio.Point2Intensity*audio.Point2Color;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_SPOTLIGHT)"
|
||||
"{"
|
||||
"col=10*audio.ConeIntensity*audio.ConeColor;"
|
||||
"}"
|
||||
"else"
|
||||
" if(m==MAT_PRISM)"
|
||||
"{"
|
||||
"col+=dot(nor,-rd)*.1;"
|
||||
"q=pos+nor*prism(pos)*2;"
|
||||
"for(int i=0;i<32;++i)"
|
||||
"{"
|
||||
"float t=prism(q);"
|
||||
"q+=nor*max(.05,-t);"
|
||||
"if(t>=.01)"
|
||||
"{"
|
||||
"nor=-calcNormal(q);"
|
||||
"refl=true;"
|
||||
"break;"
|
||||
"}"
|
||||
"}"
|
||||
"}"
|
||||
"float occ=calcAO(pos,nor);"
|
||||
"float3 lin=0;"
|
||||
"float gi=.1;"
|
||||
"{"
|
||||
"float dif=pow(clamp(1+dot(nor,rd),0,1),2);"
|
||||
"dif*=occ;"
|
||||
"dif=lerp(dif,1,gi);"
|
||||
"lin+=col*dif*float3(1,1,1);"
|
||||
"}"
|
||||
"col=lerp(lin,background,1-exp(-.001*t*t*t));"
|
||||
"}"
|
||||
"col+=(col+.5)*scatter;"
|
||||
"color+=col;"
|
||||
"return refl;"
|
||||
"}"
|
||||
"float3x3 setCamera(in float3 ro,in float3 ta,float cr)"
|
||||
"{"
|
||||
"float3 cw=normalize(ta-ro),cp=abs(cw.y)>max(abs(cw.x),abs(cw.z))?float3(sin(cr),0,cos(cr)):float3(sin(cr),cos(cr),0),cu=normalize(cross(cp,cw)),cv=cross(cu,cw);"
|
||||
"return float3x3(cu,cv,cw);"
|
||||
"}"
|
||||
"[numthreads(16,16,1)]"
|
||||
"void cs_Draw(uint3 i:SV_DispatchThreadID)"
|
||||
"{"
|
||||
"int2 iResolution;"
|
||||
"o0.GetDimensions(iResolution.x,iResolution.y);"
|
||||
"const float2 fragCoord=i.xy;"
|
||||
"float time=iTime;"
|
||||
"float3 s2;"
|
||||
"oNoise.GetDimensions(s2.x,s2.y,s2.z);"
|
||||
"float bluenoise=oNoise.Load(int3(i.xy%s2.xy,iFrame%s2.z)).x-.5;"
|
||||
"float3x3 ca=setCamera(audio.camPos,audio.camAt,audio.camRoll);"
|
||||
"float3 tot=0;"
|
||||
"float2 p=(2*(fragCoord+bluenoise)-iResolution.xy)/iResolution.y;"
|
||||
"const float fl=2.5;"
|
||||
"float3 ro=audio.camPos,rd=mul(normalize(float3(p,fl)),ca),hit,nor,col=0,q;"
|
||||
"for(int j=0;j<4&&render(ro,rd,bluenoise,hit,nor,col,q);++j)"
|
||||
"{"
|
||||
"float3 nor2,hit2,colR=0,colG=0,colB=0,q2;"
|
||||
"render(q,refract(-nor,-rd,.7),bluenoise,hit2,nor2,colR,q2);"
|
||||
"render(ro=q,rd=refract(-nor,-rd,.8),bluenoise,hit2,nor2,colG,q2);"
|
||||
"render(q,refract(-nor,-rd,.9),bluenoise,hit2,nor2,colB,q2);"
|
||||
"col+=max(0,colR*float3(.7,0,-.1)+colG*float3(.4,1,.4)+colB*float3(-.1,0,.7));"
|
||||
"}"
|
||||
"col=ToneMap(col);"
|
||||
"tot+=col;"
|
||||
"float3x3 oldCam3=setCamera(oldCamPos,oldCamAt,oldCamRoll);"
|
||||
"float projX=-dot(oldCam3[0],oldCamPos),projY=-dot(oldCam3[1],oldCamPos),projZ=-dot(oldCam3[2],oldCamPos);"
|
||||
"float4x4 oldCam=float4x4(float4(oldCam3[0],projX),float4(oldCam3[1],projY),float4(oldCam3[2],projZ),float4(0,0,0,1));"
|
||||
"float4 wpos=float4(hit,1);"
|
||||
"float3 cpos=mul(oldCam,wpos).xyz;"
|
||||
"float2 npos=fl*cpos.xy/cpos.z,spos=.5+.5*npos*float2((float)iResolution.y/iResolution.x,1);"
|
||||
"taa(tot,spos,iResolution);"
|
||||
"o0[i.xy]=float4(tot*audio.camFade,1);"
|
||||
"}";
|
||||
|
||||
#endif // INTRO_HLSL_G_H_
|
||||
865
netpoet-coop-8k/src/intro/framework/codegen/merged.hlsl
Normal file
865
netpoet-coop-8k/src/intro/framework/codegen/merged.hlsl
Normal file
@@ -0,0 +1,865 @@
|
||||
cbuffer CB : register(b0)
|
||||
{
|
||||
float3 oldCamPos;
|
||||
float iTime;
|
||||
float3 oldCamAt;
|
||||
float oTime;
|
||||
uint iFrame;
|
||||
float oldCamRoll;
|
||||
uint _a;
|
||||
uint _b;
|
||||
};
|
||||
|
||||
struct Audio
|
||||
{
|
||||
float3 ConePos;
|
||||
float ConeOpening;
|
||||
|
||||
float3 ConeDir;
|
||||
float ConeIntensity;
|
||||
|
||||
float3 ConeColor;
|
||||
float camRoll;
|
||||
|
||||
float3 Point1Pos;
|
||||
float Point1Radius;
|
||||
|
||||
float3 Point1Color;
|
||||
float Point1Intensity;
|
||||
|
||||
float3 Point2Pos;
|
||||
float Point2Radius;
|
||||
|
||||
float3 Point2Color;
|
||||
float Point2Intensity;
|
||||
|
||||
float3 Line1Start;
|
||||
float Line1Intensity;
|
||||
|
||||
float3 Line1End;
|
||||
float Line1Radius;
|
||||
|
||||
float3 Line1Color;
|
||||
float SizeX;
|
||||
|
||||
float3 Line2Start;
|
||||
float Line2Intensity;
|
||||
|
||||
float3 Line2End;
|
||||
float Line2Radius;
|
||||
|
||||
float3 Line2Color;
|
||||
float SizeY;
|
||||
|
||||
float3 Line3Start;
|
||||
float Line3Intensity;
|
||||
|
||||
float3 Line3End;
|
||||
float Line3Radius;
|
||||
|
||||
float3 Line3Color;
|
||||
float ThicknessY;
|
||||
|
||||
float3 camPos;
|
||||
float AnimX;
|
||||
|
||||
float3 camAt;
|
||||
float AnimY;
|
||||
|
||||
float3 PosX;
|
||||
float camFade;
|
||||
|
||||
float3 PosY;
|
||||
float _b;
|
||||
|
||||
float3 RotAxisX;
|
||||
float RotAngleX;
|
||||
|
||||
float3 RotAxisY;
|
||||
float RotAngleY;
|
||||
};
|
||||
|
||||
cbuffer CA : register(b1)
|
||||
{
|
||||
Audio audio;
|
||||
};
|
||||
|
||||
RWTexture2D<float4> o0 : register(u0);
|
||||
RWTexture2DArray<float> oNoise : register(u1);
|
||||
Texture2D<float4> lastFrame : register(t0);
|
||||
|
||||
|
||||
[numthreads(8, 8, 4)]void cs_BlueNoise(uint3 i : SV_DispatchThreadID)
|
||||
{
|
||||
int2 p = (i.xy + i.z * int2(113, 127));
|
||||
|
||||
int level = 19;
|
||||
int d = 0;
|
||||
for (int k = 0; k < level; k++)
|
||||
{
|
||||
int n = level - k - 1;
|
||||
int2 r = (p >> n) & 1;
|
||||
d += ((3 * r.x) ^ r.y) << (2 * n);
|
||||
if (r.y == 0)
|
||||
{
|
||||
if (r.x == 1)
|
||||
{
|
||||
p = (1 << n) - 1 - p;
|
||||
}
|
||||
p = p.yx;
|
||||
}
|
||||
}
|
||||
oNoise[i] = float(0x80000000u + 2654435789u * (uint(d) % (1u << level)) >> 24) / 256.0;
|
||||
}
|
||||
float3 linear_srgb(float3 x)
|
||||
{
|
||||
return lerp(1.055 * pow(x, 1. / 2.4) - 0.055, 12.92 * x, step(x, 0.0031308));
|
||||
}
|
||||
|
||||
static const float3x3 AP1_2_XYZ_MAT =
|
||||
{
|
||||
0.6624541811, 0.1340042065, 0.1561876870,
|
||||
0.2722287168, 0.6740817658, 0.0536895174,
|
||||
-0.0055746495, 0.0040607335, 1.0103391003
|
||||
};
|
||||
|
||||
static const float3x3 XYZ_2_AP1_MAT =
|
||||
{
|
||||
1.6410233797, -0.3248032942, -0.2364246952,
|
||||
-0.6636628587, 1.6153315917, 0.0167563477,
|
||||
0.0117218943, -0.0082844420, 0.9883948585
|
||||
};
|
||||
|
||||
static const float3x3 D60_2_D65_CAT =
|
||||
{
|
||||
0.98722400, -0.00611327, 0.0159533,
|
||||
-0.00759836, 1.00186000, 0.0053302,
|
||||
0.00307257, -0.00509595, 1.0816800
|
||||
};
|
||||
|
||||
static const float3x3 XYZ_2_REC2020_MAT =
|
||||
{
|
||||
1.7166511880, -0.3556707838, -0.2533662814,
|
||||
-0.6666843518, 1.6164812366, 0.0157685458,
|
||||
0.0176398574, -0.0427706133, 0.9421031212
|
||||
};
|
||||
|
||||
static const float SATURATION = 1.2;
|
||||
static const float EXPOSURE = 1.2;
|
||||
|
||||
|
||||
float3 ToneMap(float3 color)
|
||||
{
|
||||
|
||||
|
||||
float3 v = max(0, mul(float3x3(0.59719, 0.35458, 0.04823, 0.07600, 0.90834, 0.01566, 0.02840, 0.13383, 0.83777), color * EXPOSURE));
|
||||
float3 a = v * (v + 0.0245786f) - 0.000090537f;
|
||||
float3 b = v * (0.983729f * v + 0.4329510f) + 0.238081f;
|
||||
color = a / b;
|
||||
|
||||
color = lerp(dot(color, float3(0.272229, 0.674082, 0.0536895)), color, SATURATION);
|
||||
color = mul(AP1_2_XYZ_MAT, color);
|
||||
color = mul(D60_2_D65_CAT, color);
|
||||
color = mul(XYZ_2_REC2020_MAT, color);
|
||||
|
||||
return linear_srgb(max(0, color));
|
||||
}
|
||||
float dot2(in float2 v)
|
||||
{
|
||||
return dot(v, v);
|
||||
}
|
||||
|
||||
float dot2(in float3 v)
|
||||
{
|
||||
return dot(v, v);
|
||||
}
|
||||
|
||||
float ndot(in float2 a, in float2 b)
|
||||
{
|
||||
return a.x * b.x - a.y * b.y;
|
||||
}
|
||||
|
||||
float sdPlane(float3 p)
|
||||
{
|
||||
return p.y;
|
||||
}
|
||||
|
||||
float sdSphere(float3 p, float s)
|
||||
{
|
||||
return length(p) - s;
|
||||
}
|
||||
|
||||
float sdTetrahedron(float3 p, float e)
|
||||
{
|
||||
return (max(abs(p.x+p.y)-p.z, abs(p.x-p.y)+p.z)-e)/sqrt(3);
|
||||
}
|
||||
|
||||
float sdBox(float3 p, float3 b)
|
||||
{
|
||||
float3 d = abs(p) - b;
|
||||
return min(max(d.x, max(d.y, d.z)), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdBoxFrame(float3 p, float3 b, float e)
|
||||
{
|
||||
p = abs(p) - b;
|
||||
float3 q = abs(p + e) - e;
|
||||
|
||||
return min(min(
|
||||
length(max(float3(p.x, q.y, q.z), 0.0)) + min(max(p.x, max(q.y, q.z)), 0.0),
|
||||
length(max(float3(q.x, p.y, q.z), 0.0)) + min(max(q.x, max(p.y, q.z)), 0.0)),
|
||||
length(max(float3(q.x, q.y, p.z), 0.0)) + min(max(q.x, max(q.y, p.z)), 0.0));
|
||||
}
|
||||
|
||||
float sdEllipsoid(in float3 p, in float3 r)
|
||||
{
|
||||
float k0 = length(p / r);
|
||||
float k1 = length(p / (r * r));
|
||||
return k0 * (k0 - 1.0) / k1;
|
||||
}
|
||||
|
||||
float sdTorus(float3 p, float2 t)
|
||||
{
|
||||
return length(float2(length(p.xz) - t.x, p.y)) - t.y;
|
||||
}
|
||||
|
||||
float sdCappedTorus(in float3 p, in float2 sc, in float ra, in float rb)
|
||||
{
|
||||
p.x = abs(p.x);
|
||||
float k = (sc.y * p.x > sc.x * p.y) ? dot(p.xy, sc) : length(p.xy);
|
||||
return sqrt(dot(p, p) + ra * ra - 2.0 * ra * k) - rb;
|
||||
}
|
||||
|
||||
float sdHexPrism(float3 p, float2 h)
|
||||
{
|
||||
float3 q = abs(p);
|
||||
|
||||
const float3 k = float3(-0.8660254, 0.5, 0.57735);
|
||||
p = abs(p);
|
||||
p.xy -= 2.0 * min(dot(k.xy, p.xy), 0.0) * k.xy;
|
||||
float2 d = float2(
|
||||
length(p.xy - float2(clamp(p.x, -k.z * h.x, k.z * h.x), h.x)) * sign(p.y - h.x),
|
||||
p.z - h.y);
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdOctogonPrism(in float3 p, in float r, float h)
|
||||
{
|
||||
const float3 k = float3(-0.9238795325,
|
||||
0.3826834323,
|
||||
0.4142135623);
|
||||
|
||||
p = abs(p);
|
||||
p.xy -= 2.0 * min(dot(float2(k.x, k.y), p.xy), 0.0) * float2(k.x, k.y);
|
||||
p.xy -= 2.0 * min(dot(float2(-k.x, k.y), p.xy), 0.0) * float2(-k.x, k.y);
|
||||
|
||||
p.xy -= float2(clamp(p.x, -k.z * r, k.z * r), r);
|
||||
float2 d = float2(length(p.xy) * sign(p.y), p.z - h);
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdCapsule(float3 p, float3 a, float3 b, float r)
|
||||
{
|
||||
float3 pa = p - a, ba = b - a;
|
||||
float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);
|
||||
return length(pa - ba * h) - r;
|
||||
}
|
||||
|
||||
float sdTriPrism(float3 p, float2 h)
|
||||
{
|
||||
const float k = sqrt(3.0);
|
||||
h.x *= 0.5 * k;
|
||||
p.xy /= h.x;
|
||||
p.x = abs(p.x) - 1.0;
|
||||
p.y = p.y + 1.0 / k;
|
||||
if (p.x + k * p.y > 0.0)
|
||||
p.xy = float2(p.x - k * p.y, -k * p.x - p.y) / 2.0;
|
||||
p.x -= clamp(p.x, -2.0, 0.0);
|
||||
float d1 = length(p.xy) * sign(-p.y) * h.x;
|
||||
float d2 = abs(p.z) - h.y;
|
||||
return length(max(float2(d1, d2), 0.0)) + min(max(d1, d2), 0.);
|
||||
}
|
||||
|
||||
|
||||
float sdCylinder(float3 p, float2 h)
|
||||
{
|
||||
float2 d = abs(float2(length(p.xz), p.y)) - h;
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
|
||||
float sdCylinder(float3 p, float3 a, float3 b, float r)
|
||||
{
|
||||
float3 pa = p - a;
|
||||
float3 ba = b - a;
|
||||
float baba = dot(ba, ba);
|
||||
float paba = dot(pa, ba);
|
||||
|
||||
float x = length(pa * baba - ba * paba) - r * baba;
|
||||
float y = abs(paba - baba * 0.5) - baba * 0.5;
|
||||
float x2 = x * x;
|
||||
float y2 = y * y * baba;
|
||||
float d = (max(x, y) < 0.0) ? -min(x2, y2) : (((x > 0.0) ? x2 : 0.0) + ((y > 0.0) ? y2 : 0.0));
|
||||
return sign(d) * sqrt(abs(d)) / baba;
|
||||
}
|
||||
|
||||
|
||||
float sdCone(in float3 p, in float2 c, float h)
|
||||
{
|
||||
float2 q = h * float2(c.x, -c.y) / c.y;
|
||||
float2 w = float2(length(p.xz), p.y);
|
||||
|
||||
float2 a = w - q * clamp(dot(w, q) / dot(q, q), 0.0, 1.0);
|
||||
float2 b = w - q * float2(clamp(w.x / q.x, 0.0, 1.0), 1.0);
|
||||
float k = sign(q.y);
|
||||
float d = min(dot(a, a), dot(b, b));
|
||||
float s = max(k * (w.x * q.y - w.y * q.x), k * (w.y - q.y));
|
||||
return sqrt(d) * sign(s);
|
||||
}
|
||||
|
||||
float sdCone( in float3 p, in float3 c )
|
||||
{
|
||||
float2 q = float2( length(p.xy), p.z );
|
||||
float d1 = -q.x-c.z;
|
||||
float d2 = max( dot(q,c.xy), q.y);
|
||||
return length(max(float2(d1,d2),0.0)) + min(max(d1,d2), 0.);
|
||||
}
|
||||
|
||||
float sdCappedCone(in float3 p, in float h, in float r1, in float r2)
|
||||
{
|
||||
float2 q = float2(length(p.xz), p.y);
|
||||
|
||||
float2 k1 = float2(r2, h);
|
||||
float2 k2 = float2(r2 - r1, 2.0 * h);
|
||||
float2 ca = float2(q.x - min(q.x, (q.y < 0.0) ? r1 : r2), abs(q.y) - h);
|
||||
float2 cb = q - k1 + k2 * clamp(dot(k1 - q, k2) / dot2(k2), 0.0, 1.0);
|
||||
float s = (cb.x < 0.0 && ca.y < 0.0) ? -1.0 : 1.0;
|
||||
return s * sqrt(min(dot2(ca), dot2(cb)));
|
||||
}
|
||||
|
||||
float sdCappedCone(float3 p, float3 a, float3 b, float ra, float rb)
|
||||
{
|
||||
float rba = rb - ra;
|
||||
float baba = dot(b - a, b - a);
|
||||
float papa = dot(p - a, p - a);
|
||||
float paba = dot(p - a, b - a) / baba;
|
||||
|
||||
float x = sqrt(papa - paba * paba * baba);
|
||||
|
||||
float cax = max(0.0, x - ((paba < 0.5) ? ra : rb));
|
||||
float cay = abs(paba - 0.5) - 0.5;
|
||||
|
||||
float k = rba * rba + baba;
|
||||
float f = clamp((rba * (x - ra) + paba * baba) / k, 0.0, 1.0);
|
||||
|
||||
float cbx = x - ra - f * rba;
|
||||
float cby = paba - f;
|
||||
|
||||
float s = (cbx < 0.0 && cay < 0.0) ? -1.0 : 1.0;
|
||||
|
||||
return s * sqrt(min(cax * cax + cay * cay * baba,
|
||||
cbx * cbx + cby * cby * baba));
|
||||
}
|
||||
|
||||
|
||||
float sdSolidAngle(float3 pos, float2 c, float ra)
|
||||
{
|
||||
float2 p = float2(length(pos.xz), pos.y);
|
||||
float l = length(p) - ra;
|
||||
float m = length(p - c * clamp(dot(p, c), 0.0, ra));
|
||||
return max(l, m * sign(c.y * p.x - c.x * p.y));
|
||||
}
|
||||
|
||||
float sdPyramid(in float3 p, in float h)
|
||||
{
|
||||
float m2 = h * h + 0.25;
|
||||
|
||||
|
||||
p.xz = abs(p.xz);
|
||||
p.xz = (p.z > p.x) ? p.zx : p.xz;
|
||||
p.xz -= 0.5;
|
||||
|
||||
|
||||
float3 q = float3(p.z, h * p.y - 0.5 * p.x, h * p.x + 0.5 * p.y);
|
||||
|
||||
float s = max(-q.x, 0.0);
|
||||
float t = clamp((q.y - 0.5 * p.z) / (m2 + 0.25), 0.0, 1.0);
|
||||
|
||||
float a = m2 * (q.x + s) * (q.x + s) + q.y * q.y;
|
||||
float b = m2 * (q.x + 0.5 * t) * (q.x + 0.5 * t) + (q.y - m2 * t) * (q.y - m2 * t);
|
||||
|
||||
float d2 = min(q.y, -q.x * m2 - q.y * 0.5) > 0.0 ? 0.0 : min(a, b);
|
||||
|
||||
|
||||
return sqrt((d2 + q.z * q.z) / m2) * sign(max(q.z, -p.y));;
|
||||
}
|
||||
|
||||
|
||||
float sdRhombus(float3 p, float la, float lb, float h, float ra)
|
||||
{
|
||||
p = abs(p);
|
||||
float2 b = float2(la, lb);
|
||||
float f = clamp((ndot(b, b - 2.0 * p.xz)) / dot(b, b), -1.0, 1.0);
|
||||
float2 q = float2(length(p.xz - 0.5 * b * float2(1.0 - f, 1.0 + f)) * sign(p.x * b.y + p.z * b.x - b.x * b.y) - ra, p.y - h);
|
||||
return min(max(q.x, q.y), 0.0) + length(max(q, 0.0));
|
||||
}
|
||||
|
||||
float sdHorseshoe(in float3 p, in float2 c, in float r, in float le, float2 w)
|
||||
{
|
||||
p.x = abs(p.x);
|
||||
float l = length(p.xy);
|
||||
p.xy = mul(p.xy, float2x2(-c.x, c.y, c.y, c.x));
|
||||
p.xy = float2((p.y > 0.0 || p.x > 0.0) ? p.x : l * sign(-c.x),
|
||||
(p.x > 0.0) ? p.y : l);
|
||||
p.xy = float2(p.x, abs(p.y - r)) - float2(le, 0.0);
|
||||
|
||||
float2 q = float2(length(max(p.xy, 0.0)) + min(0.0, max(p.x, p.y)), p.z);
|
||||
float2 d = abs(q) - w;
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdU(in float3 p, in float r, in float le, float2 w)
|
||||
{
|
||||
p.x = (p.y > 0.0) ? abs(p.x) : length(p.xy);
|
||||
p.x = abs(p.x - r);
|
||||
p.y = p.y - le;
|
||||
float k = max(p.x, p.y);
|
||||
float2 q = float2((k < 0.0) ? -k : length(max(p.xy, 0.0)), abs(p.z)) - w;
|
||||
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0);
|
||||
}
|
||||
|
||||
float2 opU(float2 d1, float2 d2)
|
||||
{
|
||||
return (d1.x < d2.x) ? d1 : d2;
|
||||
}
|
||||
|
||||
void pR(inout float2 p, float a) {
|
||||
p = cos(a)*p + sin(a)*float2(p.y, -p.x);
|
||||
}
|
||||
|
||||
float4 qmul(float4 q1, float4 q2)
|
||||
{
|
||||
return float4(
|
||||
q2.xyz * q1.w + q1.xyz * q2.w + cross(q1.xyz, q2.xyz),
|
||||
q1.w * q2.w - dot(q1.xyz, q2.xyz)
|
||||
);
|
||||
}
|
||||
|
||||
void pR(inout float3 v, float4 r)
|
||||
{
|
||||
v = qmul(r, qmul(float4(v, 0), r * float4(-1, -1, -1, 1))).xyz;
|
||||
}
|
||||
|
||||
|
||||
float4 quaternion(float3 axis, float angle)
|
||||
{
|
||||
float2 sc;
|
||||
sincos(angle, sc.x, sc.y);
|
||||
return float4(normalize(axis) * sc.x, sc.y);
|
||||
}
|
||||
void taa(inout float3 old, in float2 id, int2 iResolution)
|
||||
{
|
||||
id *= iResolution;
|
||||
id += .5;
|
||||
if (any(id <= 1) || any(id >= iResolution - 1))
|
||||
return;
|
||||
|
||||
|
||||
float3 center = lastFrame[id].rgb;
|
||||
float3 minColor = center;
|
||||
float3 maxColor = center;
|
||||
for (int iy = -1; iy <= 1; ++iy)
|
||||
{
|
||||
for (int ix = -1; ix <= 1; ++ix)
|
||||
{
|
||||
if (ix == 0 && iy == 0)
|
||||
continue;
|
||||
|
||||
float3 color = lastFrame[id + int2(ix, iy)].rgb;
|
||||
minColor = min(minColor, color);
|
||||
maxColor = max(maxColor, color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
old = lerp(old, center, 0.4);
|
||||
}
|
||||
|
||||
static const float MAT_LASER1 = 3;
|
||||
static const float MAT_LASER2 = 4;
|
||||
static const float MAT_LASER3 = 5;
|
||||
static const float MAT_POINT1 = 6;
|
||||
static const float MAT_POINT2 = 7;
|
||||
static const float MAT_SPOTLIGHT = 8;
|
||||
static const float MAT_OBJ = 20;
|
||||
static const float MAT_PRISM = 21;
|
||||
|
||||
float obj(in float3 pos)
|
||||
{
|
||||
pR(pos, quaternion(audio.RotAxisX, audio.RotAngleX));
|
||||
pR(pos.xy, .608);
|
||||
pR(pos.zy, .7934);
|
||||
pos -= audio.PosX;
|
||||
return sdTetrahedron(pos, audio.SizeX);
|
||||
}
|
||||
|
||||
float prism(in float3 pos)
|
||||
{
|
||||
pR(pos, quaternion(audio.RotAxisY, audio.RotAngleY));
|
||||
pos -= audio.PosY;
|
||||
return sdTriPrism(pos, float2(audio.SizeY, audio.ThicknessY)) - .01;
|
||||
}
|
||||
|
||||
float2 map(in float3 pos)
|
||||
{
|
||||
float2 res = float2(pos.y, 0.0);
|
||||
res = opU(res, float2(obj(pos), MAT_OBJ));
|
||||
res = opU(res, float2(prism(pos), MAT_PRISM));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
float calcSoftshadow(in float3 ro, in float3 rd, in float mint, in float tmax, in float bluenoise)
|
||||
{
|
||||
float res = 1.0;
|
||||
float t = mint;
|
||||
t += (.5+bluenoise)*.1;
|
||||
for( int i=0; i<16; i++ )
|
||||
{
|
||||
float h = map(ro + rd*saturate(t)).x;
|
||||
res = min( res, 8.0*h/t );
|
||||
t += clamp( h, 0.02, 0.30 );
|
||||
if( h<0.005 || t>tmax ) break;
|
||||
}
|
||||
return clamp( res, 0.0, 1.0 );
|
||||
}
|
||||
|
||||
void laser(inout float2 h, inout float3 p, in float3 start, in float3 end, in float radius, in float bluenoise, in float3 color, in float intensity, in float mat, inout float3 scatter)
|
||||
{
|
||||
if (intensity <= 0)
|
||||
return;
|
||||
h = opU(h, float2(sdCapsule(p, start, end, radius * .01 * intensity), mat));
|
||||
float s = sdCapsule(p, start, end, radius);
|
||||
if (s < 0)
|
||||
{
|
||||
float3 ld = normalize(end - start);
|
||||
float proj = dot(p - start, ld);
|
||||
float3 lp = start + ld * proj;
|
||||
float len = max(length(lp - p), length(end - p));
|
||||
|
||||
float shadow = 1;
|
||||
scatter += color * -s * intensity * 0.1 * shadow / (len * len);
|
||||
s = .1;
|
||||
}
|
||||
else
|
||||
s = max(s, 0.1 + (.5 + bluenoise) * .1 * radius * intensity);
|
||||
h.x = min(h.x, s);
|
||||
}
|
||||
|
||||
void torch(inout float2 h, inout float3 p, in float3 start, in float3 end, in float radius, in float bluenoise, in float3 color, in float intensity, in float mat, inout float3 scatter)
|
||||
{
|
||||
if (intensity <= 0)
|
||||
return;
|
||||
h = opU(h, float2(sdSphere(p - start - .1 * normalize(end - start), .03), mat));
|
||||
float s = sdCappedCone(p, start, end, 0, radius);
|
||||
if (s < 0)
|
||||
{
|
||||
float3 ld = start - p;
|
||||
float len = length(ld);
|
||||
float shadow = calcSoftshadow(p, normalize(ld), 0.01, len, bluenoise);
|
||||
scatter += color * -s * intensity * 0.5 * shadow / (len * len);
|
||||
s = .1;
|
||||
}
|
||||
else
|
||||
s = max(s, 0.1 + (.5 + bluenoise) * .1 * radius * intensity);
|
||||
h.x = min(h.x, s);
|
||||
}
|
||||
|
||||
void lantern(inout float2 h, inout float3 p, in float3 pos, in float radius, in float bluenoise, in float3 color, in float intensity, in float mat, inout float3 scatter)
|
||||
{
|
||||
if (intensity <= 0)
|
||||
return;
|
||||
h = opU(h, float2(sdSphere(p - pos, radius * .01), mat));
|
||||
float s = sdSphere(p - pos, radius);
|
||||
if (s < 0)
|
||||
{
|
||||
float3 ld = pos - p;
|
||||
float len = length(ld);
|
||||
float shadow = calcSoftshadow(p, normalize(ld), 0.01, len, bluenoise);
|
||||
scatter += color * -s * intensity * 0.01 * shadow / (len * len);
|
||||
s = .1;
|
||||
}
|
||||
else
|
||||
s = max(s, 0.1 + (.5 + bluenoise) * .1 * radius * intensity);
|
||||
h.x = min(h.x, s);
|
||||
}
|
||||
|
||||
float2 raycast(in float3 ro, in float3 rd, in float bluenoise, out float3 scatter)
|
||||
{
|
||||
float2 res = float2(-1.0, -1.0);
|
||||
|
||||
float tmin = 0.0;
|
||||
float tmax = 20.0;
|
||||
|
||||
float3 coneDir = normalize(audio.ConeDir);
|
||||
|
||||
float tp2 = (0.0 - audio.ConePos.y) / coneDir.y;
|
||||
float3 coneTarget = audio.ConePos + coneDir;
|
||||
if (tp2 > 0.0)
|
||||
{
|
||||
tp2 *= 10;
|
||||
coneTarget = audio.ConePos + tp2 * coneDir;
|
||||
}
|
||||
float coneRadius = tp2 * tan(asin(audio.ConeOpening));
|
||||
|
||||
|
||||
tmin -= (.5+bluenoise)*.5;
|
||||
float t = tmin;
|
||||
float3 p = ro;
|
||||
float3 line1Target = audio.Line1End;
|
||||
float3 ld = normalize(line1Target - audio.Line1Start);
|
||||
for (int j = 0; j < 24; j++)
|
||||
{
|
||||
float2 h = map(p = audio.Line1Start + ld * t);
|
||||
|
||||
if (abs(h.x) < (0.01 * t))
|
||||
{
|
||||
line1Target = p;
|
||||
break;
|
||||
}
|
||||
t += h.x;
|
||||
}
|
||||
t = tmin;
|
||||
scatter = 0;
|
||||
for (int i = 0; i < 150 && t < tmax; i++)
|
||||
{
|
||||
float2 h = map(p = ro + rd * t);
|
||||
|
||||
laser(h, p, audio.Line1Start, line1Target, audio.Line1Radius, bluenoise, audio.Line1Color, audio.Line1Intensity, MAT_LASER1, scatter);
|
||||
laser(h, p, audio.Line2Start, audio.Line2End, audio.Line2Radius, bluenoise, audio.Line2Color, audio.Line2Intensity, MAT_LASER2, scatter);
|
||||
laser(h, p, audio.Line3Start, audio.Line3End, audio.Line3Radius, bluenoise, audio.Line3Color, audio.Line3Intensity, MAT_LASER3, scatter);
|
||||
lantern(h, p, audio.Point1Pos, audio.Point1Radius, bluenoise, audio.Point1Color, audio.Point1Intensity, MAT_POINT1, scatter);
|
||||
lantern(h, p, audio.Point2Pos, audio.Point2Radius, bluenoise, audio.Point2Color, audio.Point2Intensity, MAT_POINT2, scatter);
|
||||
torch(h, p, audio.ConePos, coneTarget, coneRadius, bluenoise, audio.ConeColor, audio.ConeIntensity, MAT_SPOTLIGHT, scatter);
|
||||
|
||||
if (abs(h.x) < (0.001 * t))
|
||||
{
|
||||
res = float2(t, h.y);
|
||||
break;
|
||||
}
|
||||
t += h.x;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
float3 calcNormal(in float3 pos)
|
||||
{
|
||||
|
||||
float3 n = 0;
|
||||
for (int i = min(iFrame,0); i < 4; i++)
|
||||
{
|
||||
float3 e = float3(((i + 3) >> 1) & 1, i >> 1, i & 1) - .5;
|
||||
n += e * map(pos + .005 * e).x;
|
||||
}
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
|
||||
float calcAO(in float3 pos, in float3 nor)
|
||||
{
|
||||
float occ = 0.0;
|
||||
float sca = 1.0;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
float h = 0.01 + 0.12 * float(i) / 4.0;
|
||||
float d = map(pos + h * nor).x;
|
||||
occ += (h - d) * sca;
|
||||
sca *= 0.95;
|
||||
if (occ > 0.35)
|
||||
break;
|
||||
}
|
||||
return clamp(1.0 - 3.0 * occ, 0.0, 1.0) * (0.5 + 0.5 * nor.y);
|
||||
}
|
||||
|
||||
|
||||
float checkersGradBox(in float2 p)
|
||||
{
|
||||
|
||||
float2 w = 0.001;
|
||||
|
||||
float2 i = 2.0 * (abs(frac((p - 0.5 * w) * 0.5) - 0.5) - abs(frac((p + 0.5 * w) * 0.5) - 0.5)) / w;
|
||||
|
||||
return 0.5 - 0.5 * i.x * i.y;
|
||||
}
|
||||
|
||||
bool render(in float3 ro, in float3 rd, in float bluenoise, out float3 pos, out float3 nor, inout float3 color, out float3 q)
|
||||
{
|
||||
|
||||
float3 background = 0.01;
|
||||
float3 col = background;
|
||||
nor = 0;
|
||||
|
||||
|
||||
float3 scatter;
|
||||
float2 res = raycast(ro, rd, bluenoise, scatter);
|
||||
float t = res.x;
|
||||
float m = res.y;
|
||||
bool refl = false;
|
||||
pos = q = ro;
|
||||
if (m >= 0.0)
|
||||
{
|
||||
pos += t * rd;
|
||||
nor = (m < 1.5) ? float3(0.0, 1.0, 0.0) : calcNormal(pos);
|
||||
|
||||
|
||||
if (m < 1.5)
|
||||
{
|
||||
|
||||
float f = checkersGradBox(3.0 * pos.xz);
|
||||
col = 0.15 + f * 0.05;
|
||||
}
|
||||
else if (m == MAT_OBJ)
|
||||
{
|
||||
col = 1;
|
||||
}
|
||||
else if (m == MAT_LASER1)
|
||||
{
|
||||
col = max(1, 100 * audio.Line1Intensity) * audio.Line1Color;
|
||||
}
|
||||
else if (m == MAT_LASER2)
|
||||
{
|
||||
col = max(1, 100 * audio.Line2Intensity) * audio.Line2Color;
|
||||
}
|
||||
else if (m == MAT_LASER3)
|
||||
{
|
||||
col = max(1, 100 * audio.Line3Intensity) * audio.Line3Color;
|
||||
}
|
||||
else if (m == MAT_POINT1)
|
||||
{
|
||||
col = 50 * audio.Point1Intensity * audio.Point1Color;
|
||||
}
|
||||
else if (m == MAT_POINT2)
|
||||
{
|
||||
col = 50 * audio.Point2Intensity * audio.Point2Color;
|
||||
}
|
||||
else if (m == MAT_SPOTLIGHT)
|
||||
{
|
||||
col = 10 * audio.ConeIntensity * audio.ConeColor;
|
||||
}
|
||||
else if (m == MAT_PRISM)
|
||||
{
|
||||
col += dot(nor, -rd)*.1;
|
||||
q = pos + nor * prism(pos) * 2;
|
||||
for (int i = 0; i < 32; ++i)
|
||||
{
|
||||
float t = prism(q);
|
||||
q += nor * max(0.05, -t);
|
||||
if (t >= .01)
|
||||
{
|
||||
nor = -calcNormal(q);
|
||||
refl = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float occ = calcAO(pos, nor);
|
||||
|
||||
float3 lin = 0;
|
||||
float gi = 0.1;
|
||||
|
||||
|
||||
{
|
||||
float dif = pow(clamp(1.0 + dot(nor, rd), 0.0, 1.0), 2.0);
|
||||
dif *= occ;
|
||||
dif = lerp(dif, 1, gi);
|
||||
lin += col * dif * float3(1.00, 1.00, 1.00);
|
||||
}
|
||||
|
||||
col = lerp(lin, background, 1.0 - exp(-0.001 * t * t * t));
|
||||
}
|
||||
col += (col + .5) * scatter;
|
||||
color += col;
|
||||
|
||||
return refl;
|
||||
}
|
||||
|
||||
float3x3 setCamera(in float3 ro, in float3 ta, float cr)
|
||||
{
|
||||
float3 cw = normalize(ta - ro);
|
||||
float3 cp = abs(cw.y) > max(abs(cw.x), abs(cw.z)) ? float3(sin(cr), 0.0, cos(cr)) : float3(sin(cr), cos(cr), 0.0);
|
||||
float3 cu = normalize(cross(cp, cw));
|
||||
float3 cv = (cross(cu, cw));
|
||||
return float3x3(cu, cv, cw);
|
||||
}
|
||||
|
||||
|
||||
[numthreads(16, 16, 1)]void cs_Draw(uint3 i : SV_DispatchThreadID)
|
||||
{
|
||||
int2 iResolution;
|
||||
o0.GetDimensions(iResolution.x, iResolution.y);
|
||||
const float2 fragCoord = i.xy;
|
||||
float time = iTime;
|
||||
|
||||
float3 s2;
|
||||
oNoise.GetDimensions(s2.x, s2.y, s2.z);
|
||||
float bluenoise = (oNoise.Load(int3(i.xy % s2.xy, iFrame % s2.z)).r - 0.5);
|
||||
|
||||
|
||||
|
||||
float3x3 ca = setCamera(audio.camPos, audio.camAt, audio.camRoll);
|
||||
|
||||
float3 tot = 0;
|
||||
float2 p = (2.0*(fragCoord+bluenoise)-iResolution.xy)/iResolution.y;
|
||||
|
||||
|
||||
const float fl = 2.5;
|
||||
|
||||
|
||||
float3 ro = audio.camPos;
|
||||
float3 rd = mul(normalize(float3(p, fl)), ca);
|
||||
|
||||
float3 hit, nor, col = 0, q;
|
||||
|
||||
for (int j = 0; j < 4 && render(ro, rd, bluenoise, hit, nor, col, q); ++j)
|
||||
{
|
||||
float3 nor2, hit2, colR = 0, colG = 0, colB = 0, q2;
|
||||
render(q, refract(-nor, -rd, 0.7), bluenoise, hit2, nor2, colR, q2);
|
||||
render(ro = q, rd = refract(-nor, -rd, 0.8), bluenoise, hit2, nor2, colG, q2);
|
||||
render(q, refract(-nor, -rd, 0.9), bluenoise, hit2, nor2, colB, q2);
|
||||
col += max(0, colR * float3(.7,.0,-.1) + colG * float3(.4,1,.4) + colB * float3(-.1,.0,.7));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
col = ToneMap(col);
|
||||
|
||||
tot += col;
|
||||
|
||||
|
||||
|
||||
float3x3 oldCam3 = setCamera(oldCamPos, oldCamAt, oldCamRoll);
|
||||
float projX = -dot(oldCam3[0], oldCamPos);
|
||||
float projY = -dot(oldCam3[1], oldCamPos);
|
||||
float projZ = -dot(oldCam3[2], oldCamPos);
|
||||
float4x4 oldCam = float4x4(float4(oldCam3[0], projX), float4(oldCam3[1], projY), float4(oldCam3[2], projZ), float4(0, 0, 0, 1));
|
||||
|
||||
|
||||
float4 wpos = float4(hit, 1.0);
|
||||
|
||||
float3 cpos = (mul(oldCam, wpos)).xyz;
|
||||
|
||||
float2 npos = fl * cpos.xy / cpos.z;
|
||||
|
||||
float2 spos = 0.5 + 0.5*npos*float2((float)iResolution.y/iResolution.x,1.0);
|
||||
|
||||
taa(tot, spos, iResolution);
|
||||
|
||||
o0[i.xy] = float4(tot * audio.camFade, 1);
|
||||
}
|
||||
865
netpoet-coop-8k/src/intro/framework/codegen/merged.hlsl.meta
Normal file
865
netpoet-coop-8k/src/intro/framework/codegen/merged.hlsl.meta
Normal file
@@ -0,0 +1,865 @@
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|1
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|2
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|3
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|4
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|5
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|6
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|7
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|8
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|9
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|10
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|11
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|12
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|13
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|14
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|15
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|16
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|17
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|18
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|19
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|20
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|21
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|22
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|23
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|24
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|25
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|26
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|27
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|28
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|29
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|30
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|31
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|32
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|33
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|34
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|35
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|36
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|37
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|38
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|39
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|40
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|41
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|42
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|43
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|44
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|45
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|46
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|47
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|48
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|49
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|50
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|51
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|52
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|53
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|54
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|55
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|56
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|57
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|58
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|59
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|60
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|61
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|62
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|63
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|64
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|65
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|66
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|67
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|68
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|69
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|70
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|71
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|72
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|73
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|74
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|75
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|76
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|77
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|78
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|79
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|80
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|82
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|83
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|84
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|85
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|86
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|87
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|88
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|89
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|90
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|91
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|1
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|2
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|3
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|4
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|5
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|6
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|7
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|8
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|9
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|10
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|11
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|12
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|13
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|14
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|15
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|16
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|17
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|18
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|19
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|20
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|21
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|22
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\bluenoise.hlsl|23
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|1
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|2
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|3
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|4
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|5
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|6
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|7
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|8
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|9
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|10
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|11
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|12
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|13
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|14
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|15
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|16
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|17
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|18
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|19
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|20
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|21
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|22
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|23
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|24
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|25
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|26
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|27
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|28
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|29
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|30
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|31
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|32
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|33
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|34
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|35
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|36
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|37
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|38
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|39
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|40
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|41
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|42
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|43
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|44
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|45
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|46
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|47
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|48
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|49
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|50
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|51
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|52
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\aces.hlsl|53
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|1
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|2
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|3
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|4
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|5
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|6
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|7
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|8
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|9
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|10
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|11
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|12
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|13
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|14
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|15
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|16
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|17
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|18
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|19
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|20
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|21
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|22
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|23
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|24
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|25
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|26
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|27
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|28
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|29
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|30
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|31
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|32
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|33
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|34
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|35
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|36
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|37
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|38
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|39
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|40
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|41
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|42
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|43
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|44
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|45
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|46
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|47
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|48
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|49
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|50
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|51
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|52
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|53
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|54
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|55
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|56
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|57
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|58
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|59
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|60
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|61
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|62
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|63
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|64
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|65
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|66
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|67
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|68
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|69
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|70
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|71
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|72
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|73
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|74
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|75
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|76
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|77
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|78
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|79
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|80
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|81
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|82
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|83
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|84
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|85
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|86
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|87
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|88
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|89
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|90
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|91
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|92
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|93
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|94
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|95
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|96
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|97
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|98
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|99
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|100
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|101
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|102
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|103
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|104
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|105
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|106
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|107
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|108
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|109
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|110
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|111
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|112
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|113
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|114
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|115
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|116
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|117
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|118
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|119
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|120
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|121
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|122
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|123
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|124
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|125
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|126
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|127
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|128
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|129
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|130
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|131
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|132
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|133
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|134
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|135
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|136
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|137
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|138
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|139
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|140
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|141
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|142
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|143
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|144
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|145
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|146
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|147
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|148
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|149
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|150
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|151
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|152
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|153
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|154
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|155
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|156
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|157
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|158
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|159
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|160
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|161
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|162
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|163
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|164
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|165
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|166
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|167
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|168
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|169
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|170
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|171
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|172
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|173
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|174
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|175
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|176
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|177
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|178
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|179
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|180
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|181
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|182
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|183
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|184
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|185
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|186
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|187
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|188
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|189
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|190
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|191
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|192
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|193
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|194
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|195
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|196
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|197
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|198
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|199
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|200
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|201
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|202
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|203
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|204
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|205
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|206
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|207
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|208
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|209
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|210
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|211
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|212
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|213
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|214
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|215
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|216
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|217
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|218
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|219
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|220
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|221
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|222
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|223
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|224
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|225
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|226
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|227
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|228
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|229
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|230
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|231
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|232
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|233
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|234
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|235
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|236
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|237
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|238
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|239
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|240
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|241
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|242
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|243
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|244
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|245
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|246
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|247
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|248
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|249
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|250
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|251
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|252
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|253
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|254
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|255
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|256
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|257
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|258
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|259
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|260
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|261
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|262
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|263
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|264
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|265
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|266
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|267
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|268
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|269
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|270
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|271
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|272
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|273
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|274
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|275
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|276
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|277
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|278
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|279
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|280
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|281
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|282
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|283
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|284
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|285
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|286
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|287
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|288
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|289
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|290
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|291
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|292
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\sdf.hlsl|293
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|1
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|2
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|3
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|4
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|5
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|6
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|7
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|8
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|9
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|10
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|11
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|12
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|13
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|14
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|15
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|16
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|17
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|18
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|19
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|20
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|21
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|22
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|23
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|24
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|25
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|26
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|27
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|28
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\taa.hlsl|29
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|96
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|97
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|98
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|99
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|100
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|101
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|102
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|103
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|104
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|105
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|106
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|107
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|108
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|109
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|110
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|111
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|112
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|113
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|114
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|115
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|116
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|117
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|118
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|119
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|120
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|121
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|122
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|123
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|124
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|125
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|126
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|127
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|128
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|129
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|1
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|2
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|3
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|4
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|5
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|6
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|7
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|8
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|9
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|10
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|11
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|12
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|13
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|14
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|15
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|16
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|17
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|18
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|19
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|20
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|21
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|22
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|23
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|24
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|25
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|26
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|27
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|28
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|29
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|30
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|31
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|32
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|33
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|34
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|35
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|36
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|37
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|38
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|39
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|40
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|41
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|42
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|43
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|44
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|45
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|46
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|47
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|48
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|49
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|50
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|51
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|52
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|53
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|54
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|55
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|56
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|57
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|58
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|59
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|60
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|61
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|62
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|63
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|64
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|65
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|66
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|67
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|68
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|69
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|70
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|71
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|72
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|73
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|74
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|75
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|76
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|77
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|78
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|79
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|80
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|81
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|82
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|83
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|84
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|85
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|86
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|87
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|88
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|89
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|90
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|91
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|92
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|93
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|94
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|95
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|96
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|97
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|98
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|99
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|100
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|101
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|102
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|103
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|104
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|105
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|106
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|107
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|108
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|109
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|110
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|111
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|112
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|113
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|114
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|115
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|116
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|117
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|118
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|119
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|120
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|121
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|122
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|123
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|124
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|125
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|126
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|127
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|128
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|129
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|130
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|131
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|132
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|133
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|134
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|135
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|136
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|137
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|138
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|139
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|140
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|141
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|142
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|143
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|144
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|145
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|146
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|147
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|148
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|149
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|150
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|151
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|152
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|153
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|154
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|155
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|156
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|157
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|158
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|159
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|160
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|161
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|162
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|163
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|164
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|165
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|166
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|167
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|168
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|169
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|170
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|171
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|172
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|173
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|174
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|175
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|176
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|177
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|178
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|179
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|180
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|181
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|182
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|183
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|184
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|185
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|186
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|187
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|188
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|189
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|190
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|191
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|192
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|193
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|194
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|195
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|196
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|197
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|198
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|199
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|200
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|201
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|202
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|203
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|204
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|205
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|206
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|207
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|208
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|209
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|210
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|211
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|212
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|213
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|214
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|215
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|216
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|217
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|218
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|219
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|220
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|221
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|222
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|223
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|224
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|225
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|226
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|227
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|228
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|229
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|230
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|231
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|232
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|233
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|234
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|235
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|236
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|237
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|238
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|239
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|240
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|241
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|242
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|243
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|244
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|245
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|246
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|247
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|248
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|249
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|250
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|251
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|252
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|253
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|254
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|255
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|256
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|257
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|258
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|259
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|260
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|261
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|262
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|263
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|264
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|265
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|266
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\render.hlsl|267
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|131
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|132
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|133
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|134
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|135
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|136
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|137
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|138
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|139
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|140
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|141
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|142
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|143
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|144
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|145
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|146
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|147
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|148
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|149
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|150
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|151
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|152
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|153
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|154
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|155
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|156
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|157
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|158
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|159
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|160
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|161
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|162
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|163
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|164
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|165
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|166
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|167
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|168
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|169
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|170
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|171
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|172
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|173
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|174
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|175
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|176
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|177
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|178
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|179
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|180
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|181
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|182
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|183
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|184
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|185
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|186
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|187
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|188
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|189
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|190
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|191
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|192
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|193
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|194
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|195
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|196
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|197
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|198
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|199
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|200
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|201
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|202
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|203
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|204
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|205
|
||||
E:\p4\demos\netpoet-coop-8k\src\intro\shaders\intro.hlsl|206
|
||||
133
netpoet-coop-8k/src/intro/framework/codegen/shaders_shc.g.h
Normal file
133
netpoet-coop-8k/src/intro/framework/codegen/shaders_shc.g.h
Normal file
@@ -0,0 +1,133 @@
|
||||
#pragma once
|
||||
// WARNING: This file is autogenerated by shc. Do not edit
|
||||
|
||||
#pragma data_seg(".cs_5_0")
|
||||
static char cs_5_0[] = "cs_5_0";
|
||||
|
||||
#pragma data_seg(".vs_5_0")
|
||||
static char vs_5_0[] = "vs_5_0";
|
||||
|
||||
#pragma data_seg(".gs_5_0")
|
||||
static char gs_5_0[] = "gs_5_0";
|
||||
|
||||
#pragma data_seg(".ds_5_0")
|
||||
static char ds_5_0[] = "ds_5_0";
|
||||
|
||||
#pragma data_seg(".hs_5_0")
|
||||
static char hs_5_0[] = "hs_5_0";
|
||||
|
||||
#pragma data_seg(".ps_5_0")
|
||||
static char ps_5_0[] = "ps_5_0";
|
||||
|
||||
#pragma bss_seg(".shaderbss")
|
||||
static ID3D11ComputeShader* cs_BlueNoise;
|
||||
static ID3D11ComputeShader* cs_Draw;
|
||||
|
||||
#pragma code_seg(".FrameworkShadersCompile")
|
||||
INLINE void FrameworkShadersCompile()
|
||||
{
|
||||
CompileShader("cs_BlueNoise", cs_5_0);
|
||||
device->CreateComputeShader(shaderCode, shaderSize, NULL, &cs_BlueNoise);
|
||||
CompileShader("cs_Draw", cs_5_0);
|
||||
device->CreateComputeShader(shaderCode, shaderSize, NULL, &cs_Draw);
|
||||
}
|
||||
|
||||
#ifndef AUTHORING
|
||||
#include "syncdata.g.h"
|
||||
#endif
|
||||
|
||||
struct SyncStruct_audio
|
||||
{
|
||||
float ConePos_x;
|
||||
float ConePos_y;
|
||||
float ConePos_z;
|
||||
float ConeOpening;
|
||||
float ConeDir_x;
|
||||
float ConeDir_y;
|
||||
float ConeDir_z;
|
||||
float ConeIntensity;
|
||||
float ConeColor_x;
|
||||
float ConeColor_y;
|
||||
float ConeColor_z;
|
||||
float camRoll;
|
||||
float Point1Pos_x;
|
||||
float Point1Pos_y;
|
||||
float Point1Pos_z;
|
||||
float Point1Radius;
|
||||
float Point1Color_x;
|
||||
float Point1Color_y;
|
||||
float Point1Color_z;
|
||||
float Point1Intensity;
|
||||
float Point2Pos_x;
|
||||
float Point2Pos_y;
|
||||
float Point2Pos_z;
|
||||
float Point2Radius;
|
||||
float Point2Color_x;
|
||||
float Point2Color_y;
|
||||
float Point2Color_z;
|
||||
float Point2Intensity;
|
||||
float Line1Start_x;
|
||||
float Line1Start_y;
|
||||
float Line1Start_z;
|
||||
float Line1Intensity;
|
||||
float Line1End_x;
|
||||
float Line1End_y;
|
||||
float Line1End_z;
|
||||
float Line1Radius;
|
||||
float Line1Color_x;
|
||||
float Line1Color_y;
|
||||
float Line1Color_z;
|
||||
float SizeX;
|
||||
float Line2Start_x;
|
||||
float Line2Start_y;
|
||||
float Line2Start_z;
|
||||
float Line2Intensity;
|
||||
float Line2End_x;
|
||||
float Line2End_y;
|
||||
float Line2End_z;
|
||||
float Line2Radius;
|
||||
float Line2Color_x;
|
||||
float Line2Color_y;
|
||||
float Line2Color_z;
|
||||
float SizeY;
|
||||
float Line3Start_x;
|
||||
float Line3Start_y;
|
||||
float Line3Start_z;
|
||||
float Line3Intensity;
|
||||
float Line3End_x;
|
||||
float Line3End_y;
|
||||
float Line3End_z;
|
||||
float Line3Radius;
|
||||
float Line3Color_x;
|
||||
float Line3Color_y;
|
||||
float Line3Color_z;
|
||||
float ThicknessY;
|
||||
float camPos_x;
|
||||
float camPos_y;
|
||||
float camPos_z;
|
||||
float AnimX;
|
||||
float camAt_x;
|
||||
float camAt_y;
|
||||
float camAt_z;
|
||||
float AnimY;
|
||||
float PosX_x;
|
||||
float PosX_y;
|
||||
float PosX_z;
|
||||
float camFade;
|
||||
float PosY_x;
|
||||
float PosY_y;
|
||||
float PosY_z;
|
||||
float _b;
|
||||
float RotAxisX_x;
|
||||
float RotAxisX_y;
|
||||
float RotAxisX_z;
|
||||
float RotAngleX;
|
||||
float RotAxisY_x;
|
||||
float RotAxisY_y;
|
||||
float RotAxisY_z;
|
||||
float RotAngleY;
|
||||
};
|
||||
|
||||
#define SYNC
|
||||
#include "../sync.h"
|
||||
|
||||
88
netpoet-coop-8k/src/intro/framework/codegen/sync.g.meta
Normal file
88
netpoet-coop-8k/src/intro/framework/codegen/sync.g.meta
Normal file
@@ -0,0 +1,88 @@
|
||||
ConePos_x
|
||||
ConePos_y
|
||||
ConePos_z
|
||||
ConeOpening
|
||||
ConeDir_x
|
||||
ConeDir_y
|
||||
ConeDir_z
|
||||
ConeIntensity
|
||||
ConeColor_x
|
||||
ConeColor_y
|
||||
ConeColor_z
|
||||
camRoll
|
||||
Point1Pos_x
|
||||
Point1Pos_y
|
||||
Point1Pos_z
|
||||
Point1Radius
|
||||
Point1Color_x
|
||||
Point1Color_y
|
||||
Point1Color_z
|
||||
Point1Intensity
|
||||
Point2Pos_x
|
||||
Point2Pos_y
|
||||
Point2Pos_z
|
||||
Point2Radius
|
||||
Point2Color_x
|
||||
Point2Color_y
|
||||
Point2Color_z
|
||||
Point2Intensity
|
||||
Line1Start_x
|
||||
Line1Start_y
|
||||
Line1Start_z
|
||||
Line1Intensity
|
||||
Line1End_x
|
||||
Line1End_y
|
||||
Line1End_z
|
||||
Line1Radius
|
||||
Line1Color_x
|
||||
Line1Color_y
|
||||
Line1Color_z
|
||||
SizeX
|
||||
Line2Start_x
|
||||
Line2Start_y
|
||||
Line2Start_z
|
||||
Line2Intensity
|
||||
Line2End_x
|
||||
Line2End_y
|
||||
Line2End_z
|
||||
Line2Radius
|
||||
Line2Color_x
|
||||
Line2Color_y
|
||||
Line2Color_z
|
||||
SizeY
|
||||
Line3Start_x
|
||||
Line3Start_y
|
||||
Line3Start_z
|
||||
Line3Intensity
|
||||
Line3End_x
|
||||
Line3End_y
|
||||
Line3End_z
|
||||
Line3Radius
|
||||
Line3Color_x
|
||||
Line3Color_y
|
||||
Line3Color_z
|
||||
ThicknessY
|
||||
camPos_x
|
||||
camPos_y
|
||||
camPos_z
|
||||
AnimX
|
||||
camAt_x
|
||||
camAt_y
|
||||
camAt_z
|
||||
AnimY
|
||||
PosX_x
|
||||
PosX_y
|
||||
PosX_z
|
||||
camFade
|
||||
PosY_x
|
||||
PosY_y
|
||||
PosY_z
|
||||
_b
|
||||
RotAxisX_x
|
||||
RotAxisX_y
|
||||
RotAxisX_z
|
||||
RotAngleX
|
||||
RotAxisY_x
|
||||
RotAxisY_y
|
||||
RotAxisY_z
|
||||
RotAngleY
|
||||
3133
netpoet-coop-8k/src/intro/framework/codegen/syncdata.g.h
Normal file
3133
netpoet-coop-8k/src/intro/framework/codegen/syncdata.g.h
Normal file
File diff suppressed because it is too large
Load Diff
88
netpoet-coop-8k/src/intro/framework/codegen/syncvars.g.meta
Normal file
88
netpoet-coop-8k/src/intro/framework/codegen/syncvars.g.meta
Normal file
@@ -0,0 +1,88 @@
|
||||
ConePos_x
|
||||
ConePos_y
|
||||
ConePos_z
|
||||
ConeOpening
|
||||
ConeDir_x
|
||||
ConeDir_y
|
||||
ConeDir_z
|
||||
ConeIntensity
|
||||
ConeColor_x
|
||||
ConeColor_y
|
||||
ConeColor_z
|
||||
camRoll
|
||||
Point1Pos_x
|
||||
Point1Pos_y
|
||||
Point1Pos_z
|
||||
Point1Radius
|
||||
Point1Color_x
|
||||
Point1Color_y
|
||||
Point1Color_z
|
||||
Point1Intensity
|
||||
Point2Pos_x
|
||||
Point2Pos_y
|
||||
Point2Pos_z
|
||||
Point2Radius
|
||||
Point2Color_x
|
||||
Point2Color_y
|
||||
Point2Color_z
|
||||
Point2Intensity
|
||||
Line1Start_x
|
||||
Line1Start_y
|
||||
Line1Start_z
|
||||
Line1Intensity
|
||||
Line1End_x
|
||||
Line1End_y
|
||||
Line1End_z
|
||||
Line1Radius
|
||||
Line1Color_x
|
||||
Line1Color_y
|
||||
Line1Color_z
|
||||
SizeX
|
||||
Line2Start_x
|
||||
Line2Start_y
|
||||
Line2Start_z
|
||||
Line2Intensity
|
||||
Line2End_x
|
||||
Line2End_y
|
||||
Line2End_z
|
||||
Line2Radius
|
||||
Line2Color_x
|
||||
Line2Color_y
|
||||
Line2Color_z
|
||||
SizeY
|
||||
Line3Start_x
|
||||
Line3Start_y
|
||||
Line3Start_z
|
||||
Line3Intensity
|
||||
Line3End_x
|
||||
Line3End_y
|
||||
Line3End_z
|
||||
Line3Radius
|
||||
Line3Color_x
|
||||
Line3Color_y
|
||||
Line3Color_z
|
||||
ThicknessY
|
||||
camPos_x
|
||||
camPos_y
|
||||
camPos_z
|
||||
AnimX
|
||||
camAt_x
|
||||
camAt_y
|
||||
camAt_z
|
||||
AnimY
|
||||
PosX_x
|
||||
PosX_y
|
||||
PosX_z
|
||||
camFade
|
||||
PosY_x
|
||||
PosY_y
|
||||
PosY_z
|
||||
_b
|
||||
RotAxisX_x
|
||||
RotAxisX_y
|
||||
RotAxisX_z
|
||||
RotAngleX
|
||||
RotAxisY_x
|
||||
RotAxisY_y
|
||||
RotAxisY_z
|
||||
RotAngleY
|
||||
72
netpoet-coop-8k/src/intro/framework/codegen/syncvars.meta
Normal file
72
netpoet-coop-8k/src/intro/framework/codegen/syncvars.meta
Normal file
@@ -0,0 +1,72 @@
|
||||
ConePos_x
|
||||
ConePos_y
|
||||
ConePos_z
|
||||
ConeOpening
|
||||
ConeDir_x
|
||||
ConeDir_y
|
||||
ConeDir_z
|
||||
ConeIntensity
|
||||
ConeColor_x
|
||||
ConeColor_y
|
||||
ConeColor_z
|
||||
camRoll
|
||||
Point1Pos_x
|
||||
Point1Pos_y
|
||||
Point1Pos_z
|
||||
Point1Radius
|
||||
Point1Color_x
|
||||
Point1Color_y
|
||||
Point1Color_z
|
||||
Point1Intensity
|
||||
Point2Pos_x
|
||||
Point2Pos_y
|
||||
Point2Pos_z
|
||||
Point2Radius
|
||||
Point2Color_x
|
||||
Point2Color_y
|
||||
Point2Color_z
|
||||
Point2Intensity
|
||||
Line1Start_x
|
||||
Line1Start_y
|
||||
Line1Start_z
|
||||
Line1Intensity
|
||||
Line1End_x
|
||||
Line1End_y
|
||||
Line1End_z
|
||||
Line1Radius
|
||||
Line1Color_x
|
||||
Line1Color_y
|
||||
Line1Color_z
|
||||
SizeX
|
||||
Line2Start_x
|
||||
Line2Start_y
|
||||
Line2Start_z
|
||||
Line2Intensity
|
||||
Line2End_x
|
||||
Line2End_y
|
||||
Line2End_z
|
||||
Line2Radius
|
||||
Line2Color_x
|
||||
Line2Color_y
|
||||
Line2Color_z
|
||||
_c
|
||||
Line3Start_x
|
||||
Line3Start_y
|
||||
Line3Start_z
|
||||
Line3Intensity
|
||||
Line3End_x
|
||||
Line3End_y
|
||||
Line3End_z
|
||||
Line3Radius
|
||||
Line3Color_x
|
||||
Line3Color_y
|
||||
Line3Color_z
|
||||
_d
|
||||
camPos_x
|
||||
camPos_y
|
||||
camPos_z
|
||||
AnimX
|
||||
camAt_x
|
||||
camAt_y
|
||||
camAt_z
|
||||
AnimY
|
||||
275
netpoet-coop-8k/src/intro/framework/directx.h
Normal file
275
netpoet-coop-8k/src/intro/framework/directx.h
Normal file
@@ -0,0 +1,275 @@
|
||||
#pragma once
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <dxgi.h>
|
||||
#include <dxgi1_2.h>
|
||||
#include <dxgi1_4.h>
|
||||
#include <dxgi1_6.h>
|
||||
|
||||
//#define DEPTH_STENCIL
|
||||
|
||||
#define DXFORMAT DXGI_FORMAT_R16G16B16A16_FLOAT
|
||||
|
||||
#ifndef RELEASE
|
||||
#define D3D_DEVICE_FLAGS (D3D11_CREATE_DEVICE_DEBUG)
|
||||
#else
|
||||
#define D3D_DEVICE_FLAGS 0
|
||||
#endif
|
||||
|
||||
// types
|
||||
struct TEXTURE_2D_SRV_UAV_RTV
|
||||
{
|
||||
ID3D11Texture2D* TEX;
|
||||
ID3D11ShaderResourceView* SRV;
|
||||
ID3D11UnorderedAccessView* UAV;
|
||||
ID3D11RenderTargetView* RTV;
|
||||
ID3D11ShaderResourceView* SRVMips[12];
|
||||
ID3D11RenderTargetView* RTVMips[12];
|
||||
};
|
||||
|
||||
#pragma bss_seg(".directxBss")
|
||||
static ID3D11Device* device;
|
||||
static ID3D11DeviceContext* context;
|
||||
static IDXGISwapChain* swapChain;
|
||||
static IDXGISwapChain1* swapChain1;
|
||||
static ID3D11Texture2D* backBufferTexture;
|
||||
static ID3D11RenderTargetView* backBufferRTV;
|
||||
static ID3D11ShaderResourceView* backBufferSRV;
|
||||
static ID3D11UnorderedAccessView* backBufferUAV;
|
||||
|
||||
#ifdef DEPTH_STENCIL
|
||||
static ID3D11Texture2D* depthStencilBuffer;
|
||||
static ID3D11DepthStencilState* depthTestWrite;
|
||||
static ID3D11DepthStencilView* depthStencilView;
|
||||
#endif
|
||||
|
||||
#pragma data_seg(".backBufferRTVdesc")
|
||||
static D3D11_RENDER_TARGET_VIEW_DESC backBufferRTVdesc =
|
||||
{
|
||||
DXFORMAT,
|
||||
D3D11_RTV_DIMENSION_TEXTURE2D,
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
#pragma data_seg(".backBufferSRVdesc")
|
||||
static D3D11_SHADER_RESOURCE_VIEW_DESC backBufferSRVdesc =
|
||||
{
|
||||
DXFORMAT,
|
||||
D3D11_SRV_DIMENSION_TEXTURE2D,
|
||||
{ 0, 1 }
|
||||
};
|
||||
|
||||
#pragma data_seg(".backBufferUAVdesc")
|
||||
static D3D11_UNORDERED_ACCESS_VIEW_DESC backBufferUAVdesc =
|
||||
{
|
||||
DXFORMAT,
|
||||
D3D11_UAV_DIMENSION_TEXTURE2D,
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
#pragma data_seg(".directxFeatureLevel")
|
||||
static D3D_FEATURE_LEVEL featureLevel[] = { D3D_FEATURE_LEVEL_11_0 };
|
||||
|
||||
#pragma data_seg(".directxSwapChainDesc")
|
||||
static DXGI_SWAP_CHAIN_DESC swapChainDesc =
|
||||
{
|
||||
{ SCREENWIDTH, SCREENHEIGHT, { 0, 1 }, DXFORMAT, DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED, DXGI_MODE_SCALING_UNSPECIFIED },
|
||||
{
|
||||
1, 0
|
||||
},
|
||||
DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_UNORDERED_ACCESS,
|
||||
2,
|
||||
0,
|
||||
WINDOWED,
|
||||
DXGI_SWAP_EFFECT_DISCARD,
|
||||
0
|
||||
};
|
||||
|
||||
#pragma data_seg(".directxSwapChainDesc1")
|
||||
static DXGI_SWAP_CHAIN_DESC1 swapChainDesc1 =
|
||||
{
|
||||
0,
|
||||
0,
|
||||
DXFORMAT,
|
||||
FALSE,
|
||||
{
|
||||
1, 0
|
||||
},
|
||||
DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT | DXGI_USAGE_UNORDERED_ACCESS,
|
||||
2,
|
||||
DXGI_SCALING_NONE,
|
||||
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL,
|
||||
DXGI_ALPHA_MODE_UNSPECIFIED,
|
||||
0
|
||||
};
|
||||
|
||||
#pragma data_seg(".directxSwapChainDesc")
|
||||
static DXGI_SWAP_CHAIN_FULLSCREEN_DESC swapChainFullScreenDesc =
|
||||
{
|
||||
{ 0, 1},
|
||||
DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED,
|
||||
DXGI_MODE_SCALING_UNSPECIFIED,
|
||||
WINDOWED
|
||||
};
|
||||
|
||||
#pragma data_seg(".swapChainViewport")
|
||||
static D3D11_VIEWPORT swapChainViewport =
|
||||
{
|
||||
0.0f,
|
||||
0.0f,
|
||||
SCREENWIDTH,
|
||||
SCREENHEIGHT,
|
||||
0.0f,
|
||||
1.0f,
|
||||
};
|
||||
|
||||
#pragma data_seg(".standardTexDesc")
|
||||
static D3D11_TEXTURE2D_DESC standardTexDesc =
|
||||
{
|
||||
SCREENWIDTH, SCREENHEIGHT, 0, 1, DXFORMAT,
|
||||
{ 1, 0 }, D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS,
|
||||
0, D3D11_RESOURCE_MISC_GENERATE_MIPS
|
||||
};
|
||||
|
||||
#pragma data_seg(".rasterizerDesc")
|
||||
static D3D11_RASTERIZER_DESC rasterizerDesc =
|
||||
{
|
||||
D3D11_FILL_SOLID,
|
||||
D3D11_CULL_NONE,
|
||||
TRUE,
|
||||
0,
|
||||
0.0f,
|
||||
0.0f,
|
||||
TRUE,
|
||||
FALSE,
|
||||
FALSE,
|
||||
FALSE
|
||||
};
|
||||
|
||||
#pragma data_seg(".rsvDesc")
|
||||
static UINT srvDesc[] =
|
||||
{
|
||||
0, 0, 0, 1
|
||||
};
|
||||
|
||||
#pragma data_seg(".rtvDesc")
|
||||
static UINT rtvDesc[] =
|
||||
{
|
||||
0, D3D11_RTV_DIMENSION_TEXTURE2DARRAY, 0, 0, 6
|
||||
};
|
||||
|
||||
#ifdef DEPTH_STENCIL
|
||||
|
||||
#pragma data_seg(".depthTestWriteStateDesc")
|
||||
static D3D11_DEPTH_STENCIL_DESC depthTestWriteStateDesc =
|
||||
{
|
||||
TRUE,
|
||||
D3D11_DEPTH_WRITE_MASK_ALL,
|
||||
D3D11_COMPARISON_LESS_EQUAL,
|
||||
FALSE,
|
||||
0,
|
||||
0,
|
||||
{},
|
||||
{}
|
||||
};
|
||||
|
||||
#pragma data_seg(".depthStencilViewDesc")
|
||||
static D3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc =
|
||||
{
|
||||
DXGI_FORMAT_D32_FLOAT,
|
||||
D3D11_DSV_DIMENSION_TEXTURE2D,
|
||||
0,
|
||||
{
|
||||
0
|
||||
}
|
||||
};
|
||||
|
||||
#pragma data_seg(".depthBufferDesc")
|
||||
static D3D11_TEXTURE2D_DESC depthBufferDesc =
|
||||
{
|
||||
SCREENWIDTH,
|
||||
SCREENHEIGHT,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_D32_FLOAT,
|
||||
{
|
||||
1, 0
|
||||
},
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_DEPTH_STENCIL,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#pragma code_seg("._createTextureSrvUavRtv")
|
||||
#if AUTHORING
|
||||
#include <map>
|
||||
static std::map<char*, TEXTURE_2D_SRV_UAV_RTV*> textureMap;
|
||||
|
||||
#define CreateTextureSrvRtv(textureName, width, height) _createTextureSrvUavRtv(#textureName, &textureName, width, height)
|
||||
#define CreateTextureSrvRtvDesc(textureName, width, height, desc) _createTextureSrvUavRtv(#textureName, &textureName, width, height, &desc)
|
||||
|
||||
void __stdcall _createTextureSrvUavRtv(char* texName, TEXTURE_2D_SRV_UAV_RTV* tex, int width, int height, D3D11_TEXTURE2D_DESC* desc = &standardTexDesc)
|
||||
{
|
||||
textureMap[texName] = tex;
|
||||
|
||||
#else
|
||||
|
||||
#define CreateTextureSrvRtv(textureName, width, height) _createTextureSrvUavRtv(&textureName, width, height)
|
||||
#define CreateTextureSrvRtvDesc(textureName, width, height, desc) _createTextureSrvUavRtv(&textureName, width, height, &desc)
|
||||
|
||||
void __stdcall _createTextureSrvUavRtv(TEXTURE_2D_SRV_UAV_RTV* tex, int width, int height, D3D11_TEXTURE2D_DESC* desc = &standardTexDesc)
|
||||
{
|
||||
|
||||
#endif
|
||||
|
||||
desc->Width = width;
|
||||
desc->Height = height;
|
||||
CHECK(device->CreateTexture2D(desc, NULL, &tex->TEX)); // +14h
|
||||
CHECK(device->CreateShaderResourceView(tex->TEX, NULL, &tex->SRV)); // +1Ch
|
||||
CHECK(device->CreateRenderTargetView(tex->TEX, NULL, &tex->RTV)); // +24h
|
||||
if ((desc->BindFlags & D3D11_BIND_UNORDERED_ACCESS) != 0)
|
||||
{
|
||||
CHECK(device->CreateUnorderedAccessView(tex->TEX, NULL, &tex->UAV));
|
||||
}
|
||||
// explicit mip levels? create srvs and rtvs for each level
|
||||
for (UINT level = 0; level < desc->MipLevels; level++)
|
||||
{
|
||||
srvDesc[1] = D3D11_SRV_DIMENSION_TEXTURE2D;
|
||||
rtvDesc[1] = D3D11_RTV_DIMENSION_TEXTURE2D;
|
||||
if (desc->ArraySize == 6)
|
||||
{
|
||||
srvDesc[1] = D3D11_SRV_DIMENSION_TEXTURECUBE;
|
||||
rtvDesc[1] = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
|
||||
}
|
||||
srvDesc[2] = level;
|
||||
rtvDesc[2] = level;
|
||||
CHECK(device->CreateShaderResourceView(tex->TEX, (D3D11_SHADER_RESOURCE_VIEW_DESC*)srvDesc, &tex->SRVMips[level])); // +1Ch
|
||||
CHECK(device->CreateRenderTargetView(tex->TEX, (D3D11_RENDER_TARGET_VIEW_DESC*)rtvDesc, &tex->RTVMips[level])); // +24h
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma code_seg(".directxInit")
|
||||
INLINE void DirectXInit()
|
||||
{
|
||||
Log("DirectXInit");
|
||||
|
||||
swapChainDesc.OutputWindow = windowHandle;
|
||||
CHECK(D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D_DEVICE_FLAGS, featureLevel, 1, D3D11_SDK_VERSION, &swapChainDesc, &swapChain, &device, NULL, &context));
|
||||
|
||||
context->RSSetViewports(1, &swapChainViewport);
|
||||
CHECK(swapChain->GetBuffer(0, IID_ID3D11Texture2D, (LPVOID*)&backBufferTexture));
|
||||
CHECK(device->CreateRenderTargetView(backBufferTexture, &backBufferRTVdesc, &backBufferRTV));
|
||||
CHECK(device->CreateShaderResourceView(backBufferTexture, &backBufferSRVdesc, &backBufferSRV));
|
||||
CHECK(device->CreateUnorderedAccessView(backBufferTexture, &backBufferUAVdesc, &backBufferUAV));
|
||||
|
||||
#ifdef DEPTH_STENCIL
|
||||
CHECK(device->CreateTexture2D(&depthBufferDesc, NULL, &depthStencilBuffer));
|
||||
CHECK(device->CreateDepthStencilState(&depthTestWriteStateDesc, &depthTestWrite));
|
||||
CHECK(device->CreateDepthStencilView(depthStencilBuffer, &depthStencilViewDesc, &depthStencilView));
|
||||
#endif
|
||||
}
|
||||
141
netpoet-coop-8k/src/intro/framework/framework.h
Normal file
141
netpoet-coop-8k/src/intro/framework/framework.h
Normal file
@@ -0,0 +1,141 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef _DEBUG
|
||||
#define INLINE __forceinline
|
||||
#else
|
||||
#define INLINE
|
||||
#endif
|
||||
|
||||
#define VC_EXTRALEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#include "log.h"
|
||||
#include "window.h"
|
||||
#include "directx.h"
|
||||
#include "synth/4klang.h"
|
||||
#include "sound.h"
|
||||
#include "video.h"
|
||||
|
||||
#pragma bss_seg(".shadersbss")
|
||||
static void* shaderCode;
|
||||
static size_t shaderSize;
|
||||
|
||||
#ifdef AUTHORING
|
||||
bool CompileShader_Authoring(char* entryPoint, char* profile);
|
||||
#define CompileShader(entryPoint, profile) { if (!CompileShader_Authoring(entryPoint, profile)) { shadersOK = false; return; } }
|
||||
#else
|
||||
void CompileShader_Release(char* entryPoint, char* profile);
|
||||
#define CompileShader(entryPoint, profile) CompileShader_Release(entryPoint, profile)
|
||||
#endif
|
||||
|
||||
#pragma code_seg(".introforward")
|
||||
void IntroInit();
|
||||
void IntroUpdate(float _introPosition);
|
||||
|
||||
#ifdef AUTHORING
|
||||
#include "authoring.h"
|
||||
#endif
|
||||
|
||||
#include "codegen/shaders_shc.g.h"
|
||||
|
||||
#include "shaders.h"
|
||||
|
||||
INLINE void FrameworkInit()
|
||||
{
|
||||
Log("FrameworkInit");
|
||||
WindowInit();
|
||||
DirectXInit();
|
||||
|
||||
#ifdef AUTHORING
|
||||
AuthoringInit();
|
||||
#endif
|
||||
|
||||
#ifdef SYNC
|
||||
SyncInit();
|
||||
#endif
|
||||
|
||||
ShadersInit();
|
||||
FrameworkShadersCompile();
|
||||
SoundInit();
|
||||
IntroInit();
|
||||
|
||||
#ifdef VIDEO
|
||||
VideoInit();
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE float FrameworkGetIntroPosition()
|
||||
{
|
||||
#ifdef AUTHORING
|
||||
return AuthoringGetIntroPosition();
|
||||
#elif VIDEO
|
||||
return VideoGetPosition();
|
||||
#else
|
||||
return SoundGetIntroPosition();
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE void FrameworkUpdate()
|
||||
{
|
||||
#ifdef AUTHORING
|
||||
if (::WaitForSingleObject(shaderCompileEvent, 0) == WAIT_OBJECT_0)
|
||||
{
|
||||
::Sleep(100);
|
||||
shadersOK = true;
|
||||
FrameworkShadersCompile();
|
||||
}
|
||||
|
||||
if (!shadersOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef VIDEO
|
||||
float t = VideoGetPosition();
|
||||
#else
|
||||
float t = FrameworkGetIntroPosition();
|
||||
#endif
|
||||
|
||||
#ifdef SYNC
|
||||
SyncUpdate(t);
|
||||
#endif
|
||||
|
||||
#ifdef AUTHORING
|
||||
IntroUpdate(t);
|
||||
AuthoringUpdate();
|
||||
#else
|
||||
IntroUpdate(t);
|
||||
#endif
|
||||
|
||||
#ifdef VIDEO
|
||||
VideoUpdate();
|
||||
#endif
|
||||
}
|
||||
|
||||
INLINE void FrameworkDispose()
|
||||
{
|
||||
Log("FrameworkDispose");
|
||||
#ifdef AUTHORING
|
||||
SoundDone();
|
||||
AuthoringDispose();
|
||||
#endif
|
||||
|
||||
#ifdef VIDEO
|
||||
VideoDispose();
|
||||
#endif
|
||||
}
|
||||
|
||||
static const float introLength = (float)MAX_SAMPLES / (float)(SAMPLES_PER_TICK * SOUND_TICKS_PER_SCENE);
|
||||
|
||||
INLINE bool FrameworkContinueExecuting()
|
||||
{
|
||||
#ifndef AUTHORING
|
||||
if (FrameworkGetIntroPosition() >= introLength)
|
||||
return false;
|
||||
|
||||
return !GetAsyncKeyState(VK_ESCAPE);
|
||||
#else
|
||||
return SharedMemoryTool->KeepAlive;
|
||||
#endif
|
||||
}
|
||||
65
netpoet-coop-8k/src/intro/framework/log.h
Normal file
65
netpoet-coop-8k/src/intro/framework/log.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void Log(char* _text, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, _text);
|
||||
vprintf(_text, args);
|
||||
va_end(args);
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void Warn(char* _text)
|
||||
{
|
||||
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
GetConsoleScreenBufferInfo(hstdout, &csbi);
|
||||
|
||||
SetConsoleTextAttribute(hstdout, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
|
||||
OutputDebugString("WARNING: ");
|
||||
OutputDebugString(_text);
|
||||
OutputDebugString("\n");
|
||||
Log(_text);
|
||||
|
||||
SetConsoleTextAttribute(hstdout, csbi.wAttributes);
|
||||
}
|
||||
|
||||
void Error(char* _text)
|
||||
{
|
||||
HANDLE hstdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
GetConsoleScreenBufferInfo(hstdout, &csbi);
|
||||
|
||||
SetConsoleTextAttribute(hstdout, FOREGROUND_RED | FOREGROUND_INTENSITY);
|
||||
OutputDebugString("ERROR: ");
|
||||
OutputDebugString(_text);
|
||||
OutputDebugString("\n");
|
||||
Log(_text);
|
||||
SetConsoleTextAttribute(hstdout, csbi.wAttributes);
|
||||
}
|
||||
|
||||
void CHECK(HRESULT _hResult)
|
||||
{
|
||||
if (_hResult != S_OK)
|
||||
{
|
||||
HLOCAL pBuffer;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, _hResult, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&pBuffer, 512, NULL);
|
||||
Error((char*)pBuffer);
|
||||
DebugBreak();
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
#define Log(text)
|
||||
#define Warn(text)
|
||||
#define Error(text)
|
||||
#define CHECK(hresult) hresult
|
||||
#endif
|
||||
139
netpoet-coop-8k/src/intro/framework/shaders.h
Normal file
139
netpoet-coop-8k/src/intro/framework/shaders.h
Normal file
@@ -0,0 +1,139 @@
|
||||
#pragma once
|
||||
|
||||
#include <d3dcompiler.h>
|
||||
|
||||
#pragma bss_seg(".shadersbss")
|
||||
static ID3DBlob* shaderBlob;
|
||||
static ID3DBlob* errorBlob;
|
||||
static pD3DCompile d3dCompile;
|
||||
|
||||
#pragma data_seg(".d3dcompiler")
|
||||
static char d3dcompiler[] = "d3dcompiler_47.dll";
|
||||
|
||||
#pragma data_seg(".minifiedShader")
|
||||
#include "codegen\intro_hlsl.g.h"
|
||||
|
||||
#ifdef AUTHORING
|
||||
|
||||
#include <process.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static char g_sMonitoredShaderPath[MAX_PATH];
|
||||
static __time64_t shaderChangedDate;
|
||||
|
||||
DWORD WINAPI filemon(void* args)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
_finddata_t fdata;
|
||||
long hfile = _findfirst(g_sMonitoredShaderPath, &fdata);
|
||||
if (hfile != -1)
|
||||
{
|
||||
if (fdata.time_write != shaderChangedDate)
|
||||
{
|
||||
shaderChangedDate = fdata.time_write;
|
||||
::SetEvent(shaderCompileEvent);
|
||||
}
|
||||
_findclose(hfile);
|
||||
}
|
||||
::Sleep(100);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
INLINE void ShadersInit()
|
||||
{
|
||||
HINSTANCE hl = LoadLibrary(d3dcompiler);
|
||||
if (!hl)
|
||||
{
|
||||
d3dcompiler[13] = '3';
|
||||
hl = LoadLibrary(d3dcompiler);
|
||||
}
|
||||
d3dCompile = (pD3DCompile)GetProcAddress(hl, "D3DCompile");
|
||||
|
||||
#ifdef AUTHORING
|
||||
static char exePath[MAX_PATH];
|
||||
GetModuleFileName(NULL, exePath, MAX_PATH);
|
||||
PathRemoveFileSpec(exePath);
|
||||
PathCombine(g_sMonitoredShaderPath, exePath, "..\\src\\intro\\framework\\codegen\\merged.hlsl");
|
||||
|
||||
_finddata_t fdata;
|
||||
long hfile = _findfirst(g_sMonitoredShaderPath, &fdata);
|
||||
if (hfile != -1)
|
||||
{
|
||||
shaderChangedDate = fdata.time_write;
|
||||
_findclose(hfile);
|
||||
}
|
||||
|
||||
shaderCompileEvent = ::CreateEvent(NULL, FALSE, FALSE, TEXT("WriteEvent"));
|
||||
SetThreadPriority((HANDLE)CreateThread(0, 0, &filemon, 0, 0, 0), THREAD_PRIORITY_BELOW_NORMAL);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUTHORING
|
||||
#pragma code_seg(".CompileShaderA")
|
||||
bool CompileShader_Authoring(char* entryPoint, char* profile)
|
||||
{
|
||||
ReadFile((char*)g_sMonitoredShaderPath, (char**)&shaderCode, &shaderSize);
|
||||
d3dCompile(shaderCode, shaderSize, g_sMonitoredShaderPath, NULL, NULL, entryPoint, profile, D3DCOMPILE_SKIP_VALIDATION | D3DCOMPILE_SKIP_OPTIMIZATION | D3DCOMPILE_DEBUG, 0, &shaderBlob, &errorBlob);
|
||||
if (errorBlob != NULL)
|
||||
{
|
||||
auto error = (char*)errorBlob->GetBufferPointer();
|
||||
if (shaderBlob != NULL)
|
||||
{
|
||||
Warn(error);
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(error);
|
||||
}
|
||||
|
||||
DWORD cbSize = strlen(error);
|
||||
DWORD cbWritten = 0;
|
||||
|
||||
WriteFile(
|
||||
hShaderErrorPipe, // pipe handle
|
||||
&cbSize, // message
|
||||
sizeof(DWORD), // message length
|
||||
&cbWritten, // bytes written
|
||||
NULL); // not overlapped
|
||||
|
||||
WriteFile(
|
||||
hShaderErrorPipe, // pipe handle
|
||||
error, // message
|
||||
cbSize, // message length
|
||||
&cbWritten, // bytes written
|
||||
NULL); // not overlapped
|
||||
|
||||
if (shaderBlob == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
shaderSize = shaderBlob->GetBufferSize();
|
||||
shaderCode = shaderBlob->GetBufferPointer();
|
||||
return true;
|
||||
};
|
||||
#endif
|
||||
|
||||
#pragma code_seg(".CompileShaderR")
|
||||
void CompileShader_Release(char* entryPoint, char* profile)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
d3dCompile(merged_hlsl, sizeof(merged_hlsl), NULL, NULL, NULL, entryPoint, profile, 0, 0, &shaderBlob, &errorBlob);
|
||||
if (errorBlob != NULL)
|
||||
{
|
||||
auto error = errorBlob->GetBufferPointer();
|
||||
Error((char*)error);
|
||||
}
|
||||
#else
|
||||
d3dCompile(merged_hlsl, sizeof(merged_hlsl), NULL, NULL, NULL, entryPoint, profile, 0, 0, &shaderBlob, 0);
|
||||
#endif
|
||||
|
||||
shaderSize = shaderBlob->GetBufferSize();
|
||||
shaderCode = shaderBlob->GetBufferPointer();
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
void main(uint i : SV_VertexID, out sample float2 uv : TEXCOORD, out float4 p : SV_Position)
|
||||
{
|
||||
uv = float2(i / 2, i % 2);
|
||||
p = float4(uv * 2 - 1, 0, 1);
|
||||
uv.y = 1 - uv.y;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
Texture2DMS<float4,1> in0 : register(t0);
|
||||
RWTexture1D<uint> histogramBucketR : register(u1);
|
||||
RWTexture1D<uint> histogramBucketG : register(u2);
|
||||
RWTexture1D<uint> histogramBucketB : register(u3);
|
||||
RWTexture1D<float4> histogramOut : register(u4);
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
void main(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
int3 iPixel = in0[id.xy].rgb * 255.0f;
|
||||
|
||||
InterlockedAdd(histogramBucketR[iPixel.r], 1);
|
||||
InterlockedAdd(histogramBucketG[iPixel.g], 1);
|
||||
InterlockedAdd(histogramBucketB[iPixel.b], 1);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
RWTexture1D<uint> histogramBucketR : register(u1);
|
||||
RWTexture1D<uint> histogramBucketG : register(u2);
|
||||
RWTexture1D<uint> histogramBucketB : register(u3);
|
||||
RWTexture1D<float4> histogramOut : register(u4);
|
||||
|
||||
[numthreads(16, 1, 1)]
|
||||
void main(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
InterlockedMax(histogramBucketR[256], histogramBucketR[id.x]);
|
||||
InterlockedMax(histogramBucketG[256], histogramBucketG[id.x]);
|
||||
InterlockedMax(histogramBucketB[256], histogramBucketB[id.x]);
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
RWTexture1D<uint> histogramBucketR : register(u1);
|
||||
RWTexture1D<uint> histogramBucketG : register(u2);
|
||||
RWTexture1D<uint> histogramBucketB : register(u3);
|
||||
RWTexture2D<uint4> histogramOut : register(u4);
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
void main(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
float3 hist = float3(
|
||||
log(1.0 + histogramBucketR[id.x]) / log(1.0 + histogramBucketR[256]),
|
||||
log(1.0 + histogramBucketG[id.x]) / log(1.0 + histogramBucketG[256]),
|
||||
log(1.0 + histogramBucketB[id.x]) / log(1.0 + histogramBucketB[256]));
|
||||
|
||||
int x = id.x;
|
||||
uint yB = (uint)(255 * (1.0f - hist.b));
|
||||
uint yG = (uint)(255 * (1.0f - hist.g));
|
||||
uint yR = (uint)(255 * (1.0f - hist.r));
|
||||
|
||||
float4 color = max(0, float4(128 * step(yB, id.y), 128 * step(yG, id.y), 128 * step(yR, id.y), 0));
|
||||
if (id.y == yB)
|
||||
color.r = 255;
|
||||
if (id.y == yG)
|
||||
color.g = 255;
|
||||
if (id.y == yR)
|
||||
color.b = 255;
|
||||
|
||||
histogramOut[id.xy] = color;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
Texture2DMS<float4,1> in0 : register(t0);
|
||||
RWTexture2D<uint> paradeBucketR : register(u1);
|
||||
RWTexture2D<uint> paradeBucketG : register(u2);
|
||||
RWTexture2D<uint> paradeBucketB : register(u3);
|
||||
RWTexture2D<uint> paradeBucketA : register(u4);
|
||||
RWTexture2D<uint> vectorScopeBucket : register(u5);
|
||||
RWTexture2D<uint4> paradeOut : register(u6);
|
||||
RWTexture2D<uint4> vectorScopeOut : register(u7);
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
void main(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
float3 pixel = in0[id.xy].rgb;
|
||||
int3 iPixel = pixel * 255.0f;
|
||||
float luminance = dot(pixel, float3(0.2126f, 0.7152f, 0.0722f));
|
||||
float2 f = float2(0.492f, 0.877f) * (pixel.br - luminance);
|
||||
int2 uv = min(255, max(0, 128 * (1 + f / float2(0.436f, 0.615f))));
|
||||
|
||||
float3 resolution;
|
||||
in0.GetDimensions(resolution.x, resolution.y, resolution.z);
|
||||
int paradeCoord = (id.x * 255.0f) / resolution.x;
|
||||
|
||||
InterlockedAdd(paradeBucketR[int2(paradeCoord, 255 - iPixel.r)], 1);
|
||||
InterlockedAdd(paradeBucketG[int2(paradeCoord, 255 - iPixel.g)], 1);
|
||||
InterlockedAdd(paradeBucketB[int2(paradeCoord, 255 - iPixel.b)], 1);
|
||||
InterlockedAdd(paradeBucketA[int2(paradeCoord, 255 - (uint)(255.0f * luminance))], 1);
|
||||
InterlockedAdd(vectorScopeBucket[uv], 1);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
RWTexture2D<uint> paradeBucketR : register(u1);
|
||||
RWTexture2D<uint> paradeBucketG : register(u2);
|
||||
RWTexture2D<uint> paradeBucketB : register(u3);
|
||||
RWTexture2D<uint> paradeBucketA : register(u4);
|
||||
RWTexture2D<uint> vectorScopeBucket : register(u5);
|
||||
RWTexture2D<uint4> paradeOut : register(u6);
|
||||
RWTexture2D<uint4> vectorScopeOut : register(u7);
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
void main(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
InterlockedMax(paradeBucketR[uint2(256, 0)], paradeBucketR[id.xy]);
|
||||
InterlockedMax(paradeBucketG[uint2(256, 0)], paradeBucketG[id.xy]);
|
||||
InterlockedMax(paradeBucketB[uint2(256, 0)], paradeBucketB[id.xy]);
|
||||
InterlockedMax(paradeBucketA[uint2(256, 0)], paradeBucketA[id.xy]);
|
||||
InterlockedMax(vectorScopeBucket[uint2(256, 0)], vectorScopeBucket[id.xy]);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
RWTexture2D<uint> paradeBucketR : register(u1);
|
||||
RWTexture2D<uint> paradeBucketG : register(u2);
|
||||
RWTexture2D<uint> paradeBucketB : register(u3);
|
||||
RWTexture2D<uint> paradeBucketA : register(u4);
|
||||
RWTexture2D<uint> vectorScopeBucket : register(u5);
|
||||
RWTexture2D<uint4> paradeOut : register(u6);
|
||||
RWTexture2D<uint4> vectorScopeOut : register(u7);
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
void main( uint3 id : SV_DispatchThreadID )
|
||||
{
|
||||
uint4 parade = uint4(
|
||||
255.0f * log(1.0f + paradeBucketR[id.xy]) / log(1.0f + paradeBucketR[uint2(256, 0)]),
|
||||
255.0f * log(1.0f + paradeBucketG[id.xy]) / log(1.0f + paradeBucketG[uint2(256, 0)]),
|
||||
255.0f * log(1.0f + paradeBucketB[id.xy]) / log(1.0f + paradeBucketB[uint2(256, 0)]),
|
||||
255.0f * log(1.0f + paradeBucketA[id.xy]) / log(1.0f + paradeBucketA[uint2(256, 0)]));
|
||||
paradeOut[id.xy + uint2(0 * 256, 0)] = parade.w;
|
||||
paradeOut[id.xy + uint2(3 * 256, 0)] = parade.z * float4(1, 0, 0, 1);
|
||||
paradeOut[id.xy + uint2(2 * 256, 0)] = parade.y * float4(0, 1, 0, 1);
|
||||
paradeOut[id.xy + uint2(1 * 256, 0)] = parade.x * float4(0, 0, 1, 1);
|
||||
|
||||
float luminance = 1.0f - max(0.0f, min(1.0f, log(1.0f + vectorScopeBucket[id.xy]) / log(1.0f + vectorScopeBucket[uint2(256, 0)])));
|
||||
float2 f = (id.xy - 128.0f) / 128.0f;
|
||||
if (length(f) > 1)
|
||||
luminance = 0.0f;
|
||||
|
||||
float2 uv = ((id.xy / 128.0f) - 1.0f) * float2(0.436f, 0.615f);
|
||||
|
||||
float3 _a = float3(0, -0.3950f, 2.03252f);
|
||||
float3 _b = float3(1.14025f, -0.581f, 0);
|
||||
uint3 rgb = luminance * 255.0f * min(1, max(0, (0.5f + uv.x * _a + uv.y * _b)));
|
||||
|
||||
vectorScopeOut[id.xy] = uint4(rgb.zyx, 255);
|
||||
}
|
||||
9
netpoet-coop-8k/src/intro/framework/shaders/resolve.hlsl
Normal file
9
netpoet-coop-8k/src/intro/framework/shaders/resolve.hlsl
Normal file
@@ -0,0 +1,9 @@
|
||||
Texture2D<float4> t2d0 : register(t0);
|
||||
|
||||
float4 main(in float2 uv : TEXCOORD) : SV_Target0
|
||||
{
|
||||
int2 s;
|
||||
t2d0.GetDimensions(s.x, s.y);
|
||||
return t2d0.Load(int3(uv * s, 0));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
Texture2D<float4> in0 : register(t0);
|
||||
RWTexture2D<uint4> o0 : register(u1);
|
||||
RWTexture2D<uint4> o1 : register(u2);
|
||||
|
||||
[numthreads(16, 16, 1)]
|
||||
void main(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
float4 i = in0[id.xy];
|
||||
o0[id.xy] = float4(i.bgra) * 255;
|
||||
o1[id.xy] = float4(i.a, i.a, i.a, 1) * 255;
|
||||
}
|
||||
88
netpoet-coop-8k/src/intro/framework/sound.h
Normal file
88
netpoet-coop-8k/src/intro/framework/sound.h
Normal file
@@ -0,0 +1,88 @@
|
||||
#pragma once
|
||||
|
||||
#pragma data_seg(".wavehdr")
|
||||
#define SOUND_TICKS_PER_SCENE 64
|
||||
|
||||
#include <mmsystem.h>
|
||||
#include <mmreg.h>
|
||||
|
||||
#pragma bss_seg(".audio_bss")
|
||||
#ifdef AUTHORING
|
||||
static HANDLE SoundThread;
|
||||
static float* soundBuffer;
|
||||
#else
|
||||
static float soundBuffer[MAX_SAMPLES * 2];
|
||||
#endif
|
||||
static HWAVEOUT hWaveOut;
|
||||
|
||||
#pragma data_seg(".wavehdr")
|
||||
#ifndef RELEASE
|
||||
WAVEHDR WaveHDR =
|
||||
{
|
||||
(LPSTR)soundBuffer,
|
||||
MAX_SAMPLES * sizeof(float) * 2,
|
||||
0, 0, 0, 0, 0, 0
|
||||
};
|
||||
#else
|
||||
WAVEHDR WaveHDR =
|
||||
{
|
||||
(LPSTR)soundBuffer,
|
||||
MAX_SAMPLES * sizeof(float) * 2,
|
||||
0, 0, WHDR_PREPARED, 0, 0, 0
|
||||
};
|
||||
#endif
|
||||
|
||||
#pragma data_seg(".wavefmt")
|
||||
WAVEFORMATEX WaveFMT =
|
||||
{
|
||||
#ifdef FLOAT_32BIT
|
||||
WAVE_FORMAT_IEEE_FLOAT,
|
||||
#else
|
||||
WAVE_FORMAT_PCM,
|
||||
#endif
|
||||
2, // channels
|
||||
SAMPLE_RATE, // samples per sec
|
||||
SAMPLE_RATE * sizeof(float) * 2, // bytes per sec
|
||||
sizeof(float) * 2, // block alignment;
|
||||
sizeof(float) * 8, // bits per sample
|
||||
0 // extension not needed
|
||||
};
|
||||
|
||||
#pragma data_seg(".mmtime")
|
||||
static MMTIME mmtime =
|
||||
{
|
||||
TIME_SAMPLES
|
||||
};
|
||||
|
||||
INLINE float SoundGetIntroPosition()
|
||||
{
|
||||
waveOutGetPosition(hWaveOut, &mmtime, sizeof(MMTIME));
|
||||
return mmtime.u.sample / (float)(SAMPLES_PER_TICK * SOUND_TICKS_PER_SCENE);
|
||||
}
|
||||
|
||||
#pragma code_seg(".initsnd")
|
||||
INLINE void SoundInit()
|
||||
{
|
||||
#ifdef AUTHORING
|
||||
SoundThread =
|
||||
#endif
|
||||
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)_4klang_render, soundBuffer, 0, 0);
|
||||
|
||||
#ifndef VIDEO
|
||||
::Sleep(1024);// give the 4klang render call some time
|
||||
|
||||
waveOutOpen(&hWaveOut, -1, &WaveFMT, 0, 0, 0);
|
||||
#ifndef RELEASE
|
||||
waveOutPrepareHeader(hWaveOut, &WaveHDR, 0x20);
|
||||
#endif
|
||||
waveOutWrite(hWaveOut, &WaveHDR, 0x20);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUTHORING
|
||||
INLINE void SoundDone()
|
||||
{
|
||||
waveOutClose(hWaveOut);
|
||||
TerminateThread(SoundThread, 0);
|
||||
}
|
||||
#endif
|
||||
107
netpoet-coop-8k/src/intro/framework/sync.h
Normal file
107
netpoet-coop-8k/src/intro/framework/sync.h
Normal file
@@ -0,0 +1,107 @@
|
||||
#pragma once
|
||||
|
||||
#pragma bss_seg(".syncbss")
|
||||
static ID3D11Buffer* SyncBuffer;
|
||||
static SyncStruct_audio* Sync;
|
||||
|
||||
#pragma data_seg(".syncBufferDesc")
|
||||
static D3D11_BUFFER_DESC syncBufferDesc =
|
||||
{
|
||||
sizeof(SyncStruct_audio),
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_CONSTANT_BUFFER,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
#pragma code_seg(".SyncInit")
|
||||
INLINE void SyncInit()
|
||||
{
|
||||
device->CreateBuffer(&syncBufferDesc, nullptr, &SyncBuffer);
|
||||
Sync = (SyncStruct_audio*)(syncDataAudio + 1);
|
||||
}
|
||||
|
||||
#pragma code_seg(".SyncUpdate")
|
||||
INLINE void SyncUpdate(float t)
|
||||
{
|
||||
auto fRow = (t * SOUND_TICKS_PER_SCENE);
|
||||
auto iChannelCount = syncDataAudio[0];
|
||||
if (iChannelCount == 0)
|
||||
return;
|
||||
|
||||
auto pTarget = (float*)&syncDataAudio[1];
|
||||
auto pChannels = (char*)(pTarget + iChannelCount);
|
||||
for (int iChannel = 0; iChannel < iChannelCount; ++iChannel)
|
||||
{
|
||||
auto iValueCount = *(unsigned short*)(pChannels);
|
||||
auto pChannelRows = (unsigned short*)(pChannels + 2);
|
||||
auto pChannelModes = (char*)(pChannelRows + iValueCount);
|
||||
auto pChannelValues = (float*)(pChannelModes + iValueCount);
|
||||
pChannels = (char*)(pChannelValues + iValueCount);
|
||||
for (int iIndex = 0; iIndex < iValueCount;)
|
||||
{
|
||||
int iRow = pChannelRows[iIndex];
|
||||
int iNextRow = pChannelRows[iIndex + 1];
|
||||
if (iRow <= fRow && iNextRow + 1 > fRow)
|
||||
{
|
||||
float t = (fRow - iRow) / (iNextRow - iRow + 1);
|
||||
switch (pChannelModes[iIndex])
|
||||
{
|
||||
case 0: // Step
|
||||
t = 0.0f;
|
||||
break;
|
||||
case 1: // Linear
|
||||
break;
|
||||
case 2: // Cubic
|
||||
t *= t * (3 - 2 * t);
|
||||
break;
|
||||
case 3: // EaseIn
|
||||
t *= t;
|
||||
break;
|
||||
case 4: // EaseOut
|
||||
t *= -t + 2;
|
||||
break;
|
||||
}
|
||||
pTarget[iChannel] = (1 - t) * pChannelValues[iIndex] + t * pChannelValues[iIndex + 1];
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pChannelModes[iIndex] != 0)
|
||||
++iIndex;
|
||||
|
||||
pTarget[iChannel] = pChannelValues[iIndex];
|
||||
|
||||
++iIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AUTHORING
|
||||
if (*(unsigned char*)&syncOverrideData[0] == 0xff)
|
||||
{
|
||||
int i = 1;
|
||||
while (true)
|
||||
{
|
||||
auto iChannel = *(unsigned char*)&syncOverrideData[i++];
|
||||
if (iChannel == 0xff)
|
||||
break;
|
||||
|
||||
auto fValue = *(float*)&syncOverrideData[i];
|
||||
i += 4;
|
||||
pTarget[iChannel] = fValue;
|
||||
}
|
||||
}
|
||||
Sync = (SyncStruct_audio*)pTarget;
|
||||
if (SyncBuffer != NULL)
|
||||
SyncBuffer->Release();
|
||||
|
||||
syncBufferDesc.ByteWidth = iChannelCount * sizeof(float);
|
||||
device->CreateBuffer(&syncBufferDesc, nullptr, &SyncBuffer);
|
||||
|
||||
if (iChannelCount != 0)
|
||||
#endif
|
||||
|
||||
context->UpdateSubresource(SyncBuffer, 0, NULL, pTarget, iChannelCount * sizeof(float), sizeof(float));
|
||||
}
|
||||
1766
netpoet-coop-8k/src/intro/framework/synth/4klang.asm
Normal file
1766
netpoet-coop-8k/src/intro/framework/synth/4klang.asm
Normal file
File diff suppressed because it is too large
Load Diff
22
netpoet-coop-8k/src/intro/framework/synth/4klang.h
Normal file
22
netpoet-coop-8k/src/intro/framework/synth/4klang.h
Normal file
@@ -0,0 +1,22 @@
|
||||
// some useful song defines for 4klang
|
||||
#define SAMPLE_RATE 44100
|
||||
#define BPM 180.000000
|
||||
#define MAX_INSTRUMENTS 11
|
||||
#define MAX_PATTERNS 116
|
||||
#define PATTERN_SIZE_SHIFT 4
|
||||
#define PATTERN_SIZE (1 << PATTERN_SIZE_SHIFT)
|
||||
#define MAX_TICKS (MAX_PATTERNS*PATTERN_SIZE)
|
||||
#define SAMPLES_PER_TICK 3675
|
||||
#define MAX_SAMPLES (SAMPLES_PER_TICK*MAX_TICKS)
|
||||
#define POLYPHONY 2
|
||||
#define FLOAT_32BIT
|
||||
#define SAMPLE_TYPE float
|
||||
|
||||
#define WINDOWS_OBJECT
|
||||
|
||||
// declaration of the external synth render function, you'll always need that
|
||||
extern "C" void __stdcall _4klang_render(void*);
|
||||
// declaration of the external envelope buffer. access only if you're song was exported with that option
|
||||
extern "C" float _4klang_envelope_buffer;
|
||||
// declaration of the external note buffer. access only if you're song was exported with that option
|
||||
extern "C" int _4klang_note_buffer;
|
||||
1312
netpoet-coop-8k/src/intro/framework/synth/4klang.inc
Normal file
1312
netpoet-coop-8k/src/intro/framework/synth/4klang.inc
Normal file
File diff suppressed because it is too large
Load Diff
BIN
netpoet-coop-8k/src/intro/framework/synth/8klang.merge
Normal file
BIN
netpoet-coop-8k/src/intro/framework/synth/8klang.merge
Normal file
Binary file not shown.
1872
netpoet-coop-8k/src/intro/framework/synth/patterns.dbg
Normal file
1872
netpoet-coop-8k/src/intro/framework/synth/patterns.dbg
Normal file
File diff suppressed because it is too large
Load Diff
152
netpoet-coop-8k/src/intro/framework/video.h
Normal file
152
netpoet-coop-8k/src/intro/framework/video.h
Normal file
@@ -0,0 +1,152 @@
|
||||
#ifdef VIDEO
|
||||
#include <vfw.h>
|
||||
|
||||
#define FPS 60
|
||||
#define MOTION_BLUR 8
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PAVISTREAM m_ps;
|
||||
PAVISTREAM m_psCompressed;
|
||||
PAVISTREAM m_psAudio;
|
||||
AVISTREAMINFO m_strhdr;
|
||||
AVICOMPRESSOPTIONS m_opts;
|
||||
PAVIFILE m_pfile;
|
||||
BITMAPINFOHEADER m_alpbi;
|
||||
} AVIWRITER;
|
||||
|
||||
static D3D11_TEXTURE2D_DESC videoStagingTextureDesc =
|
||||
{
|
||||
SCREENWIDTH,
|
||||
SCREENHEIGHT,
|
||||
1,
|
||||
1,
|
||||
DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||
{ 1, 0 },
|
||||
D3D11_USAGE_STAGING,
|
||||
0,
|
||||
D3D11_CPU_ACCESS_READ,
|
||||
0
|
||||
};
|
||||
|
||||
#pragma bss_seg(".videobss")
|
||||
static AVIWRITER avi;
|
||||
static int frame = 0;
|
||||
static ID3D11Texture2D* videoStagingTexture;
|
||||
static byte buffer[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
static int tempBuffer[3 * SCREENWIDTH * SCREENHEIGHT];
|
||||
|
||||
#pragma code_seg(".VideoInit")
|
||||
void VideoInit()
|
||||
{
|
||||
AVIFileInit();
|
||||
CHECK(AVIFileOpen(&avi.m_pfile, "intro.avi", OF_WRITE | OF_CREATE, NULL));
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeVIDEO;
|
||||
avi.m_strhdr.fccHandler = 0;
|
||||
avi.m_strhdr.dwScale = 1;
|
||||
avi.m_strhdr.dwRate = FPS;
|
||||
avi.m_strhdr.dwSuggestedBufferSize = 0;// 3 * SCREENWIDTH * SCREENHEIGHT;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
CHECK(AVIFileCreateStream(avi.m_pfile, &avi.m_ps, &avi.m_strhdr));
|
||||
|
||||
memset(&avi.m_strhdr, 0, sizeof(avi.m_strhdr));
|
||||
avi.m_strhdr.fccType = streamtypeAUDIO;
|
||||
avi.m_strhdr.dwScale = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwRate = WaveFMT.nSamplesPerSec * WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwSampleSize = WaveFMT.nBlockAlign;
|
||||
avi.m_strhdr.dwQuality = (DWORD)-1;
|
||||
SetRect(&avi.m_strhdr.rcFrame, 0, 0, SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
CHECK(AVIFileCreateStream(avi.m_pfile, &avi.m_psAudio, &avi.m_strhdr));
|
||||
CHECK(AVIStreamSetFormat(avi.m_psAudio, 0, &WaveFMT, sizeof(WAVEFORMATEX)));
|
||||
|
||||
auto ops = &avi.m_opts;
|
||||
if (AVISaveOptions(windowHandle, 0, 1, &avi.m_ps, &ops) == FALSE)
|
||||
{
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
CHECK(AVIMakeCompressedStream(&avi.m_psCompressed, avi.m_ps, &avi.m_opts, NULL));
|
||||
|
||||
memset(&avi.m_alpbi, 0, sizeof(avi.m_alpbi));
|
||||
avi.m_alpbi.biSize = sizeof(avi.m_alpbi);
|
||||
avi.m_alpbi.biWidth = SCREENWIDTH;
|
||||
avi.m_alpbi.biHeight = SCREENHEIGHT;
|
||||
avi.m_alpbi.biPlanes = 1;
|
||||
avi.m_alpbi.biBitCount = 24;
|
||||
avi.m_alpbi.biCompression = BI_RGB;
|
||||
|
||||
CHECK(AVIStreamSetFormat(avi.m_psCompressed, 0, &avi.m_alpbi, sizeof(avi.m_alpbi)));
|
||||
|
||||
CHECK(device->CreateTexture2D(&videoStagingTextureDesc, NULL, &videoStagingTexture));
|
||||
}
|
||||
|
||||
#pragma code_seg(".VideoGetPosition")
|
||||
float VideoGetPosition()
|
||||
{
|
||||
float seconds = (float)frame / (float)(FPS * MOTION_BLUR);
|
||||
float samples = seconds * SAMPLE_RATE;
|
||||
float ticks = samples / (float)SAMPLES_PER_TICK;
|
||||
return ticks / SOUND_TICKS_PER_SCENE;
|
||||
}
|
||||
|
||||
#pragma code_seg(".VideoUpdate")
|
||||
void VideoUpdate()
|
||||
{
|
||||
static D3D11_MAPPED_SUBRESOURCE videoMappedSubresource;
|
||||
|
||||
context->CopyResource(videoStagingTexture, backBufferTexture);
|
||||
context->Map(videoStagingTexture, 0, D3D11_MAP_READ, 0, &videoMappedSubresource);
|
||||
|
||||
auto introPtr = (byte*)videoMappedSubresource.pData;
|
||||
for (int y = 0; y < SCREENHEIGHT; ++y)
|
||||
{
|
||||
auto vy = SCREENHEIGHT - y - 1;
|
||||
for (int x = 0; x < SCREENWIDTH; ++x)
|
||||
{
|
||||
for (int c = 0; c < 4; ++c)
|
||||
{
|
||||
byte color = *introPtr++;
|
||||
if (c < 3)
|
||||
{
|
||||
auto vc = 2 - c;
|
||||
auto vidx = vc + 3 * (x + SCREENWIDTH * vy);
|
||||
tempBuffer[vidx] += color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
context->Unmap(videoStagingTexture, 0);
|
||||
|
||||
if ((frame++ % MOTION_BLUR) == 0)
|
||||
{
|
||||
auto videoPtr = (byte*)buffer;
|
||||
auto tempPtr = (int*)tempBuffer;
|
||||
for (int i = 0; i < SCREENWIDTH * SCREENHEIGHT * 3; ++i)
|
||||
{
|
||||
*videoPtr++ = (byte)(*tempPtr / MOTION_BLUR);
|
||||
*tempPtr++ = 0;
|
||||
}
|
||||
|
||||
CHECK(AVIStreamWrite(avi.m_psCompressed, (frame - 1) / MOTION_BLUR, 1, buffer, 3 * SCREENWIDTH * SCREENHEIGHT, AVIIF_KEYFRAME, NULL, NULL));
|
||||
}
|
||||
}
|
||||
|
||||
#pragma code_seg(".VideoDispose")
|
||||
void VideoDispose()
|
||||
{
|
||||
auto const extraSamples = 0;// SOUND_TICKS_PER_SCENE * SAMPLES_PER_TICK / 4;
|
||||
static SAMPLE_TYPE audioBuffer[2 * (MAX_SAMPLES + extraSamples)];
|
||||
memcpy(audioBuffer + extraSamples * 2, WaveHDR.lpData, WaveHDR.dwBufferLength);
|
||||
AVIStreamWrite(avi.m_psAudio, 0, MAX_SAMPLES + extraSamples, audioBuffer, WaveHDR.dwBufferLength + extraSamples * sizeof(SAMPLE_TYPE) * 2, 0, NULL, NULL);
|
||||
|
||||
AVIStreamClose(avi.m_ps);
|
||||
AVIStreamClose(avi.m_psCompressed);
|
||||
AVIStreamClose(avi.m_psAudio);
|
||||
AVIFileClose(avi.m_pfile);
|
||||
AVIFileExit();
|
||||
}
|
||||
#endif
|
||||
93
netpoet-coop-8k/src/intro/framework/window.h
Normal file
93
netpoet-coop-8k/src/intro/framework/window.h
Normal file
@@ -0,0 +1,93 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef SCREENWIDTH
|
||||
#define SCREENWIDTH 1280
|
||||
#endif
|
||||
|
||||
#ifndef SCREENHEIGHT
|
||||
#define SCREENHEIGHT 720
|
||||
#endif
|
||||
|
||||
#ifndef ASPECT
|
||||
#define ASPECT 1.6f
|
||||
#endif
|
||||
|
||||
#ifndef WINDOWED
|
||||
#define WINDOWED TRUE
|
||||
#endif
|
||||
|
||||
#pragma bss_seg(".windowbss")
|
||||
static float windowWidth = SCREENWIDTH;
|
||||
static float windowHeight = SCREENHEIGHT;
|
||||
static HWND windowHandle;
|
||||
|
||||
#ifdef VIDEO
|
||||
#define windowTitle "Intro (rendering to video)"
|
||||
#endif
|
||||
|
||||
#ifdef RELEASE
|
||||
#define windowTitle "Intro (release)"
|
||||
#endif
|
||||
|
||||
#ifdef SHADERDEBUG
|
||||
#define windowTitle "Intro (shader debug)"
|
||||
#endif
|
||||
|
||||
#ifdef AUTHORING
|
||||
#define windowTitle "Intro (authoring)"
|
||||
#undef WINDOWED
|
||||
#define WINDOWED TRUE
|
||||
#endif
|
||||
|
||||
#ifndef windowTitle
|
||||
#define windowTitle "Intro (unknown configuration)"
|
||||
#endif
|
||||
|
||||
#pragma code_seg(".windowInit")
|
||||
INLINE void WindowInit()
|
||||
{
|
||||
Log("WindowInit");
|
||||
#ifdef RELEASE
|
||||
#if WINDOWED == TRUE
|
||||
windowHandle = CreateWindowExA(0, (LPCSTR)0x0000C019, 0, WS_POPUP | WS_VISIBLE, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0, 0);
|
||||
#else
|
||||
windowHandle = CreateWindowExA(0, (LPCSTR)0x0000C019, 0, WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_MAXIMIZE, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
#endif
|
||||
ShowCursor(false);
|
||||
#else
|
||||
WNDCLASSEX wndclass;
|
||||
wndclass.cbSize = sizeof(wndclass);
|
||||
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
|
||||
wndclass.lpfnWndProc = (WNDPROC)DefWindowProc;
|
||||
wndclass.cbClsExtra = 0;
|
||||
wndclass.cbWndExtra = 0;
|
||||
wndclass.hInstance = NULL;
|
||||
wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wndclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
|
||||
wndclass.lpszMenuName = NULL;
|
||||
wndclass.lpszClassName = "IntroWindowClass";
|
||||
wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
|
||||
|
||||
RegisterClassEx(&wndclass);
|
||||
#ifndef AUTHORING
|
||||
windowHandle = CreateWindowExA(0,
|
||||
wndclass.lpszClassName,
|
||||
windowTitle,
|
||||
WS_EX_APPWINDOW,
|
||||
GetSystemMetrics(SM_CXSCREEN) - windowWidth - 16,
|
||||
0,
|
||||
windowWidth + 16,
|
||||
windowHeight + 39,
|
||||
NULL,
|
||||
NULL,
|
||||
GetModuleHandle(NULL),
|
||||
NULL
|
||||
);
|
||||
ShowWindow(windowHandle, SW_NORMAL);
|
||||
SetWindowPos(windowHandle, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
#else
|
||||
windowHandle = CreateWindowExA(0, wndclass.lpszClassName, windowTitle, 0, 0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0, GetModuleHandle(NULL), 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
548
netpoet-coop-8k/src/intro/intro.vcxproj
Normal file
548
netpoet-coop-8k/src/intro/intro.vcxproj
Normal file
@@ -0,0 +1,548 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Authoring|Win32">
|
||||
<Configuration>Authoring</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ShaderDebug|Win32">
|
||||
<Configuration>ShaderDebug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Compress|Win32">
|
||||
<Configuration>Compress</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Video|Win32">
|
||||
<Configuration>Video</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EC001821-5569-4BB5-87B3-20CB8FF9137B}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ConsoleApplication1</RootNamespace>
|
||||
<ProjectName>intro</ProjectName>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
<ExecutablePath>$(SolutionDir)\tools;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
<ExecutablePath>$(SolutionDir)\tools;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
<ExecutablePath>$(SolutionDir)\tools;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
<ExecutablePath>$(SolutionDir)\tools;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)bin\</OutDir>
|
||||
<IntDir>$(SolutionDir)obj\$(Configuration)\</IntDir>
|
||||
<TargetName>$(ProjectName)_$(Configuration)</TargetName>
|
||||
<ExecutablePath>$(SolutionDir)\tools;$(ExecutablePath)</ExecutablePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>SHADERDEBUG;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>dxgi.lib;d3d11.lib;dxguid.lib;D3dcompiler.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Outputs>
|
||||
</Outputs>
|
||||
<Inputs>
|
||||
</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>VIDEO;WIN32;SYNC_PLAYER;RELEASE;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>dxgi.lib;d3d11.lib;dxguid.lib;D3dcompiler.lib;winmm.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Outputs>
|
||||
</Outputs>
|
||||
<Inputs>
|
||||
</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>AUTHORING;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>dxgi.lib;d3d11.lib;dxguid.lib;D3dcompiler.lib;winmm.lib;Shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Outputs>
|
||||
</Outputs>
|
||||
<Inputs>
|
||||
</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>false</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>COMPRESS;RELEASE;WIN32;NDEBUG;SYNC_PLAYER;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</OmitFramePointers>
|
||||
<WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</WholeProgramOptimization>
|
||||
<ExceptionHandling Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExceptionHandling>
|
||||
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</BufferSecurityCheck>
|
||||
<FloatingPointModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Fast</FloatingPointModel>
|
||||
<DebugInformationFormat>None</DebugInformationFormat>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AdditionalOptions>/QIfist %(AdditionalOptions)</AdditionalOptions>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>dxgi.lib;dxguid.lib;d3d11.lib;D3dcompiler.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<EntryPointSymbol>main</EntryPointSymbol>
|
||||
<AdditionalOptions>/CRINKLER /TRANSFORM:CALLS /HASHTRIES:500 /ORDERTRIES:10000 /UNSAFEIMPORT /COMPMODE:VERYSLOW /REPORT:crinkler.html /PROGRESSGUI %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Outputs>
|
||||
</Outputs>
|
||||
<Inputs>
|
||||
</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>RELEASE;WIN32;SYNC_PLAYER;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AssemblerOutput>All</AssemblerOutput>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>dxgi.lib;d3d11.lib;dxguid.lib;D3dcompiler.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<CustomBuildStep>
|
||||
<Command>
|
||||
</Command>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep>
|
||||
<Message>
|
||||
</Message>
|
||||
<Outputs>
|
||||
</Outputs>
|
||||
<Inputs>
|
||||
</Inputs>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<AssemblerOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">All</AssemblerOutput>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="framework\authoring.h" />
|
||||
<ClInclude Include="framework\directx.h" />
|
||||
<ClInclude Include="framework\framework.h" />
|
||||
<ClInclude Include="framework\log.h" />
|
||||
<ClInclude Include="framework\shaders.h" />
|
||||
<ClInclude Include="framework\sync.h" />
|
||||
<ClInclude Include="framework\synth\4klang.h" />
|
||||
<ClInclude Include="framework\video.h" />
|
||||
<ClInclude Include="framework\window.h" />
|
||||
<ClInclude Include="intro\data.h" />
|
||||
<ClInclude Include="framework\sound.h" />
|
||||
<ClInclude Include="intro\update.h" />
|
||||
<ClInclude Include="intro\functions.h" />
|
||||
<ClInclude Include="intro\init.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="framework\synth\4klang.asm">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">yasm -f win32 -o "$(IntermediateOutputPath)framework\synth\4klang.obj" "$(ProjectDir)framework\synth\4klang.asm"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">$(IntermediateOutputPath)framework\synth\4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">$(ProjectDir)framework\synth\4klang.inc</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">yasm -f win32 -o "$(IntermediateOutputPath)framework\synth\4klang.obj" "$(ProjectDir)framework\synth\4klang.asm"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">yasm -f win32 -o "$(IntermediateOutputPath)framework\synth\4klang.obj" "$(ProjectDir)framework\synth\4klang.asm"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compiling 4klang...</Message>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">$(IntermediateOutputPath)framework\synth\4klang.obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntermediateOutputPath)framework\synth\4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">$(ProjectDir)framework\synth\4klang.inc</AdditionalInputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)framework\synth\4klang.inc</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">yasm -f win32 -o "$(IntermediateOutputPath)framework\synth\4klang.obj" "$(ProjectDir)framework\synth\4klang.asm"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">$(IntermediateOutputPath)framework\synth\4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">$(ProjectDir)framework\synth\4klang.inc</AdditionalInputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">yasm -D AUTHORING -f win32 -o "$(IntermediateOutputPath)framework\synth\4klang.obj" "$(ProjectDir)framework\synth\4klang.asm"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compiling 4klang...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">$(IntermediateOutputPath)framework\synth\4klang.obj</Outputs>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">$(ProjectDir)framework\synth\4klang.inc</AdditionalInputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="framework\synth\4klang.inc" />
|
||||
<None Include="framework\synth\8klang.merge" />
|
||||
<None Include="framework\synth\patterns.dbg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="shaders\intro.hlsl">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">$(TargetDir)shc "%(FullPath)" "$(ProjectDir)framework\codegen\intro_hlsl.g.h" "$(ProjectDir)framework\codegen\shaders_shc.g.h" "$(ProjectDir)framework\codegen\merged.hlsl" "$(ProjectDir)framework\codegen\syncvars.meta"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(TargetDir)shc "%(FullPath)" "$(ProjectDir)framework\codegen\intro_hlsl.g.h" "$(ProjectDir)framework\codegen\shaders_shc.g.h" "$(ProjectDir)framework\codegen\merged.hlsl" "$(ProjectDir)framework\codegen\syncvars.meta"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">$(TargetDir)shc "%(FullPath)" "$(ProjectDir)framework\codegen\intro_hlsl.g.h" "$(ProjectDir)framework\codegen\shaders_shc.g.h" "$(ProjectDir)framework\codegen\merged.hlsl" "$(ProjectDir)framework\codegen\syncvars.meta"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">$(TargetDir)shc "%(FullPath)" "$(ProjectDir)framework\codegen\intro_hlsl.g.h" "$(ProjectDir)framework\codegen\shaders_shc.g.h" "$(ProjectDir)framework\codegen\merged.hlsl" "$(ProjectDir)framework\codegen\syncvars.meta"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">$(TargetDir)shc "%(FullPath)" "$(ProjectDir)framework\codegen\intro_hlsl.g.h" "$(ProjectDir)framework\codegen\shaders_shc.g.h" "$(ProjectDir)framework\codegen\merged.hlsl" "$(ProjectDir)framework\codegen\syncvars.meta"</Command>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compiling intro.hlsl...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">$(ProjectDir)framework\codegen\shaders_shc.g.h;$(ProjectDir)framework\codegen\intro_hlsl.g.h;$(ProjectDir)framework\codegen\merged.hlsl;$(ProjectDir)framework\codegen\syncvars.meta;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling intro.hlsl...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)framework\codegen\shaders_shc.g.h;$(ProjectDir)framework\codegen\intro_hlsl.g.h;$(ProjectDir)framework\codegen\merged.hlsl;$(ProjectDir)framework\codegen\syncvars.meta;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compiling intro.hlsl...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">$(ProjectDir)framework\codegen\shaders_shc.g.h;$(ProjectDir)framework\codegen\intro_hlsl.g.h;$(ProjectDir)framework\codegen\merged.hlsl;$(ProjectDir)framework\codegen\syncvars.meta;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compiling intro.hlsl...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">$(ProjectDir)framework\codegen\shaders_shc.g.h;$(ProjectDir)framework\codegen\intro_hlsl.g.h;$(ProjectDir)framework\codegen\merged.hlsl;$(ProjectDir)framework\codegen\syncvars.meta;%(Outputs)</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compiling intro.hlsl...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">$(ProjectDir)framework\codegen\shaders_shc.g.h;$(ProjectDir)framework\codegen\intro_hlsl.g.h;$(ProjectDir)framework\codegen\merged.hlsl;$(ProjectDir)framework\codegen\syncvars.meta;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="framework\shaders\fullscreen.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Vertex</ShaderType>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Vertex</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\histogramGather.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\histogramSpread.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\histogramMaximum.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\paradeVectorscopeGather.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\paradeVectorscopeMaximum.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\paradeVectorscopeSpread.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\resolve.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Pixel</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Pixel</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Pixel</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Pixel</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="framework\shaders\textureViewer.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">5.0</ShaderModel>
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">Compute</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">5.0</ShaderModel>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</EnableDebuggingInformation>
|
||||
<DisableOptimizations Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</DisableOptimizations>
|
||||
<EnableDebuggingInformation Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</EnableDebuggingInformation>
|
||||
</FxCompile>
|
||||
<FxCompile Include="shaders\aces.hlsl">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</ExcludedFromBuild>
|
||||
</FxCompile>
|
||||
<FxCompile Include="shaders\bluenoise.hlsl">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ShaderDebug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Video|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Compress|Win32'">true</ExcludedFromBuild>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Xml Include="intro\sync.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
10
netpoet-coop-8k/src/intro/intro.vcxproj.user
Normal file
10
netpoet-coop-8k/src/intro/intro.vcxproj.user
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>true</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Authoring|Win32'">
|
||||
<LocalDebuggerDebuggerType>NativeOnly</LocalDebuggerDebuggerType>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
70
netpoet-coop-8k/src/intro/intro/data.h
Normal file
70
netpoet-coop-8k/src/intro/intro/data.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
|
||||
#define BLUENOISE_DIMENSIONS 1024
|
||||
#define BLUENOISE_FRAMES 32
|
||||
|
||||
struct CB
|
||||
{
|
||||
float oldCamPos_x;
|
||||
float oldCamPos_y;
|
||||
float oldCamPos_z;
|
||||
float iTime;
|
||||
float oldCamAt_x;
|
||||
float oldCamAt_y;
|
||||
float oldCamAt_z;
|
||||
float oTime;
|
||||
unsigned int iFrame;
|
||||
float oldCamRoll;
|
||||
float _a;
|
||||
float _b;
|
||||
};
|
||||
|
||||
#pragma bss_seg(".introbss")
|
||||
static ID3D11RasterizerState* rasterState;
|
||||
static ID3D11Buffer* constantBuffer;
|
||||
static ID3D11Texture2D* blueNoiseTexture;
|
||||
static ID3D11Texture2D* lastFrame;
|
||||
static ID3D11ShaderResourceView* lastFrameSRV;
|
||||
static ID3D11UnorderedAccessView* blueNoiseUAV;
|
||||
static UINT zero[16];
|
||||
|
||||
#pragma data_seg(".cbuffer")
|
||||
static CB cbuffer { 0 };
|
||||
|
||||
#pragma data_seg(".negOne")
|
||||
static UINT negOne[4] = { -1, -1, -1, -1 };
|
||||
|
||||
#pragma data_seg(".blueNoiseTexDesc")
|
||||
static D3D11_TEXTURE2D_DESC blueNoiseTexDesc =
|
||||
{
|
||||
BLUENOISE_DIMENSIONS, BLUENOISE_DIMENSIONS, 0, BLUENOISE_FRAMES, DXGI_FORMAT_R32_FLOAT,
|
||||
{ 1, 0 }, D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_UNORDERED_ACCESS,
|
||||
0, 0
|
||||
};
|
||||
|
||||
#pragma data_seg(".constantBufferDesc")
|
||||
static D3D11_BUFFER_DESC constantBufferDesc =
|
||||
{
|
||||
sizeof(CB),
|
||||
D3D11_USAGE_DEFAULT,
|
||||
D3D11_BIND_CONSTANT_BUFFER,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
#pragma data_seg(".rasterDesc")
|
||||
static D3D11_RASTERIZER_DESC rasterDesc =
|
||||
{
|
||||
D3D11_FILL_SOLID,
|
||||
D3D11_CULL_NONE,
|
||||
FALSE,
|
||||
0,
|
||||
0.0f,
|
||||
0.0f,
|
||||
FALSE,
|
||||
FALSE,
|
||||
FALSE,
|
||||
FALSE,
|
||||
};
|
||||
15
netpoet-coop-8k/src/intro/intro/init.h
Normal file
15
netpoet-coop-8k/src/intro/intro/init.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#pragma code_seg(".IntroInit")
|
||||
INLINE void IntroInit()
|
||||
{
|
||||
Log("IntroInit");
|
||||
|
||||
device->CreateRasterizerState(&rasterDesc, &rasterState);
|
||||
device->CreateBuffer(&constantBufferDesc, nullptr, &constantBuffer);
|
||||
device->CreateTexture2D(&blueNoiseTexDesc, nullptr, &blueNoiseTexture);
|
||||
device->CreateUnorderedAccessView(blueNoiseTexture, nullptr, &blueNoiseUAV);
|
||||
device->CreateTexture2D(&blueNoiseTexDesc, nullptr, &blueNoiseTexture);
|
||||
device->CreateTexture2D(&standardTexDesc, nullptr, &lastFrame);
|
||||
device->CreateShaderResourceView(lastFrame, &backBufferSRVdesc, &lastFrameSRV);
|
||||
}
|
||||
549
netpoet-coop-8k/src/intro/intro/sync.xml
Normal file
549
netpoet-coop-8k/src/intro/intro/sync.xml
Normal file
@@ -0,0 +1,549 @@
|
||||
<Audio>
|
||||
<Channel Name="ConePos_x">
|
||||
<Value Row="0" Mode="Step" Value="-1" />
|
||||
</Channel>
|
||||
<Channel Name="ConePos_y">
|
||||
<Value Row="0" Mode="Step" Value="2" />
|
||||
</Channel>
|
||||
<Channel Name="ConePos_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="ConeOpening">
|
||||
<Value Row="0" Mode="Step" Value="0.5" />
|
||||
</Channel>
|
||||
<Channel Name="ConeDir_x">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="ConeDir_y">
|
||||
<Value Row="0" Mode="Step" Value="-2" />
|
||||
</Channel>
|
||||
<Channel Name="ConeDir_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="ConeIntensity">
|
||||
<Value Row="0" Mode="Cubic" Value="0" />
|
||||
<Value Row="31" Mode="Step" Value="1" />
|
||||
<Value Row="32" Mode="Cubic" Value="1" />
|
||||
<Value Row="63" Mode="Step" Value="0" />
|
||||
<Value Row="64" Mode="Cubic" Value="0" />
|
||||
<Value Row="95" Mode="Step" Value="1" />
|
||||
<Value Row="96" Mode="Cubic" Value="1" />
|
||||
<Value Row="127" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="ConeColor_x">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="ConeColor_y">
|
||||
<Value Row="0" Mode="Step" Value="0.3" />
|
||||
</Channel>
|
||||
<Channel Name="ConeColor_z">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="camRoll">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="60" Mode="Cubic" Value="0" />
|
||||
<Value Row="63" Mode="Step" Value="2.095" />
|
||||
<Value Row="64" Mode="Step" Value="2.095" />
|
||||
<Value Row="124" Mode="Cubic" Value="2.095" />
|
||||
<Value Row="127" Mode="Step" Value="4.188" />
|
||||
<Value Row="128" Mode="Step" Value="4.188" />
|
||||
<Value Row="188" Mode="Cubic" Value="4.188" />
|
||||
<Value Row="191" Mode="Step" Value="6.28" />
|
||||
<Value Row="192" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Pos_x">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Pos_y">
|
||||
<Value Row="0" Mode="Step" Value="0.5" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Pos_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Radius">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Color_x">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Color_y">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Color_z">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Point1Intensity">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Point2Pos_x">
|
||||
</Channel>
|
||||
<Channel Name="Point2Pos_y">
|
||||
</Channel>
|
||||
<Channel Name="Point2Pos_z">
|
||||
</Channel>
|
||||
<Channel Name="Point2Radius">
|
||||
</Channel>
|
||||
<Channel Name="Point2Color_x">
|
||||
</Channel>
|
||||
<Channel Name="Point2Color_y">
|
||||
</Channel>
|
||||
<Channel Name="Point2Color_z">
|
||||
</Channel>
|
||||
<Channel Name="Point2Intensity">
|
||||
</Channel>
|
||||
<Channel Name="Line1Start_x">
|
||||
<Value Row="0" Mode="Step" Value="-0.26" />
|
||||
<Value Row="58" Mode="EaseIn" Value="-0.26" />
|
||||
<Value Row="61" Mode="Step" Value="0" />
|
||||
<Value Row="62" Mode="Step" Value="0" />
|
||||
<Value Row="118" Mode="Step" Value="0.5" />
|
||||
<Value Row="122" Mode="EaseIn" Value="0.5" />
|
||||
<Value Row="125" Mode="Step" Value="0" />
|
||||
<Value Row="126" Mode="Step" Value="0" />
|
||||
<Value Row="182" Mode="Step" Value="-0.25" />
|
||||
<Value Row="186" Mode="EaseIn" Value="-0.25" />
|
||||
<Value Row="189" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Start_y">
|
||||
<Value Row="0" Mode="Step" Value="0.1" />
|
||||
<Value Row="58" Mode="EaseIn" Value="0.1" />
|
||||
<Value Row="61" Mode="Step" Value="0.75" />
|
||||
<Value Row="62" Mode="Step" Value="0.75" />
|
||||
<Value Row="118" Mode="Step" Value="0.1" />
|
||||
<Value Row="122" Mode="EaseIn" Value="0.1" />
|
||||
<Value Row="125" Mode="Step" Value="0.75" />
|
||||
<Value Row="126" Mode="Step" Value="0.75" />
|
||||
<Value Row="182" Mode="Step" Value="0.1" />
|
||||
<Value Row="186" Mode="EaseIn" Value="0.1" />
|
||||
<Value Row="189" Mode="Step" Value="1" />
|
||||
<Value Row="190" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Start_z">
|
||||
<Value Row="0" Mode="Step" Value="0.45" />
|
||||
<Value Row="58" Mode="EaseIn" Value="0.45" />
|
||||
<Value Row="61" Mode="Step" Value="0" />
|
||||
<Value Row="62" Mode="Step" Value="0" />
|
||||
<Value Row="118" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="EaseIn" Value="0" />
|
||||
<Value Row="125" Mode="Step" Value="0" />
|
||||
<Value Row="126" Mode="Step" Value="0" />
|
||||
<Value Row="182" Mode="Step" Value="-0.4" />
|
||||
<Value Row="186" Mode="EaseIn" Value="-0.4" />
|
||||
<Value Row="189" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Intensity">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="54" Mode="EaseIn" Value="0" />
|
||||
<Value Row="57" Mode="Step" Value="1" />
|
||||
<Value Row="58" Mode="EaseIn" Value="1" />
|
||||
<Value Row="61" Mode="Step" Value="0" />
|
||||
<Value Row="62" Mode="Step" Value="0" />
|
||||
<Value Row="118" Mode="EaseIn" Value="0" />
|
||||
<Value Row="121" Mode="Step" Value="1" />
|
||||
<Value Row="122" Mode="EaseIn" Value="1" />
|
||||
<Value Row="125" Mode="Step" Value="0" />
|
||||
<Value Row="126" Mode="Step" Value="0" />
|
||||
<Value Row="182" Mode="EaseIn" Value="0" />
|
||||
<Value Row="185" Mode="Step" Value="1" />
|
||||
<Value Row="186" Mode="EaseIn" Value="1" />
|
||||
<Value Row="189" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line1End_x">
|
||||
<Value Row="0" Mode="Step" Value="-0.26" />
|
||||
<Value Row="54" Mode="EaseOut" Value="-0.26" />
|
||||
<Value Row="57" Mode="Step" Value="0" />
|
||||
<Value Row="58" Mode="Step" Value="0" />
|
||||
<Value Row="118" Mode="EaseOut" Value="0.5" />
|
||||
<Value Row="121" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="Step" Value="0" />
|
||||
<Value Row="182" Mode="EaseOut" Value="-0.25" />
|
||||
<Value Row="185" Mode="Step" Value="0" />
|
||||
<Value Row="186" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line1End_y">
|
||||
<Value Row="0" Mode="Step" Value="0.1" />
|
||||
<Value Row="54" Mode="EaseOut" Value="0.1" />
|
||||
<Value Row="57" Mode="Step" Value="0.75" />
|
||||
<Value Row="58" Mode="Step" Value="0.75" />
|
||||
<Value Row="118" Mode="EaseOut" Value="0.1" />
|
||||
<Value Row="121" Mode="Step" Value="0.75" />
|
||||
<Value Row="122" Mode="Step" Value="0.75" />
|
||||
<Value Row="182" Mode="EaseOut" Value="0.1" />
|
||||
<Value Row="185" Mode="Step" Value="1" />
|
||||
<Value Row="186" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Line1End_z">
|
||||
<Value Row="0" Mode="Step" Value="0.45" />
|
||||
<Value Row="54" Mode="EaseOut" Value="0.45" />
|
||||
<Value Row="57" Mode="Step" Value="0" />
|
||||
<Value Row="58" Mode="Step" Value="0" />
|
||||
<Value Row="118" Mode="EaseOut" Value="0" />
|
||||
<Value Row="121" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="Step" Value="0" />
|
||||
<Value Row="182" Mode="EaseOut" Value="-0.4" />
|
||||
<Value Row="185" Mode="Step" Value="0" />
|
||||
<Value Row="186" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Radius">
|
||||
<Value Row="0" Mode="Step" Value="0.1" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Color_x">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Color_y">
|
||||
<Value Row="0" Mode="Step" Value="-0.04" />
|
||||
</Channel>
|
||||
<Channel Name="Line1Color_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="SizeX">
|
||||
<Value Row="0" Mode="Step" Value="0.45" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Start_x">
|
||||
<Value Row="58" Mode="Step" Value="0" />
|
||||
<Value Row="62" Mode="EaseIn" Value="0" />
|
||||
<Value Row="65" Mode="Step" Value="-0.26" />
|
||||
<Value Row="66" Mode="Step" Value="-0.26" />
|
||||
<Value Row="122" Mode="Step" Value="0" />
|
||||
<Value Row="126" Mode="EaseIn" Value="0" />
|
||||
<Value Row="129" Mode="Step" Value="-0.25" />
|
||||
<Value Row="130" Mode="Step" Value="-0.25" />
|
||||
<Value Row="186" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="EaseIn" Value="0" />
|
||||
<Value Row="193" Mode="Step" Value="0.5" />
|
||||
<Value Row="194" Mode="Step" Value="0.5" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Start_y">
|
||||
<Value Row="58" Mode="Step" Value="0.75" />
|
||||
<Value Row="62" Mode="EaseIn" Value="0.75" />
|
||||
<Value Row="65" Mode="Step" Value="0.1" />
|
||||
<Value Row="66" Mode="Step" Value="0.1" />
|
||||
<Value Row="122" Mode="Step" Value="0.75" />
|
||||
<Value Row="126" Mode="EaseIn" Value="0.75" />
|
||||
<Value Row="129" Mode="Step" Value="0.1" />
|
||||
<Value Row="130" Mode="Step" Value="0.1" />
|
||||
<Value Row="186" Mode="Step" Value="0.75" />
|
||||
<Value Row="190" Mode="EaseIn" Value="0.75" />
|
||||
<Value Row="193" Mode="Step" Value="0.1" />
|
||||
<Value Row="194" Mode="Step" Value="0.1" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Start_z">
|
||||
<Value Row="58" Mode="Step" Value="0" />
|
||||
<Value Row="62" Mode="EaseIn" Value="0" />
|
||||
<Value Row="65" Mode="Step" Value="-0.45" />
|
||||
<Value Row="66" Mode="Step" Value="-0.45" />
|
||||
<Value Row="122" Mode="Step" Value="0" />
|
||||
<Value Row="126" Mode="EaseIn" Value="0" />
|
||||
<Value Row="129" Mode="Step" Value="0.45" />
|
||||
<Value Row="130" Mode="Step" Value="0.45" />
|
||||
<Value Row="186" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="EaseIn" Value="0" />
|
||||
<Value Row="193" Mode="Step" Value="0" />
|
||||
<Value Row="194" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Intensity">
|
||||
<Value Row="58" Mode="EaseIn" Value="0" />
|
||||
<Value Row="61" Mode="Step" Value="1" />
|
||||
<Value Row="62" Mode="EaseIn" Value="1" />
|
||||
<Value Row="65" Mode="Step" Value="0" />
|
||||
<Value Row="66" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="EaseIn" Value="0" />
|
||||
<Value Row="125" Mode="Step" Value="1" />
|
||||
<Value Row="126" Mode="EaseIn" Value="1" />
|
||||
<Value Row="129" Mode="Step" Value="0" />
|
||||
<Value Row="130" Mode="Step" Value="0" />
|
||||
<Value Row="186" Mode="EaseIn" Value="0" />
|
||||
<Value Row="189" Mode="Step" Value="1" />
|
||||
<Value Row="190" Mode="EaseIn" Value="1" />
|
||||
<Value Row="193" Mode="Step" Value="0" />
|
||||
<Value Row="194" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line2End_x">
|
||||
<Value Row="58" Mode="EaseOut" Value="0" />
|
||||
<Value Row="61" Mode="Step" Value="-0.26" />
|
||||
<Value Row="62" Mode="Step" Value="-0.26" />
|
||||
<Value Row="122" Mode="EaseOut" Value="0" />
|
||||
<Value Row="125" Mode="Step" Value="-0.25" />
|
||||
<Value Row="126" Mode="Step" Value="-0.25" />
|
||||
<Value Row="186" Mode="EaseOut" Value="0" />
|
||||
<Value Row="189" Mode="Step" Value="0.5" />
|
||||
<Value Row="190" Mode="Step" Value="0.5" />
|
||||
</Channel>
|
||||
<Channel Name="Line2End_y">
|
||||
<Value Row="58" Mode="EaseOut" Value="0.75" />
|
||||
<Value Row="61" Mode="Step" Value="0.1" />
|
||||
<Value Row="62" Mode="Step" Value="0.1" />
|
||||
<Value Row="122" Mode="EaseOut" Value="0.75" />
|
||||
<Value Row="125" Mode="Step" Value="0.1" />
|
||||
<Value Row="126" Mode="Step" Value="0.1" />
|
||||
<Value Row="186" Mode="EaseOut" Value="1" />
|
||||
<Value Row="189" Mode="Step" Value="0.1" />
|
||||
<Value Row="190" Mode="Step" Value="0.1" />
|
||||
</Channel>
|
||||
<Channel Name="Line2End_z">
|
||||
<Value Row="58" Mode="EaseOut" Value="0" />
|
||||
<Value Row="61" Mode="Step" Value="-0.45" />
|
||||
<Value Row="62" Mode="Step" Value="-0.45" />
|
||||
<Value Row="122" Mode="EaseOut" Value="0" />
|
||||
<Value Row="125" Mode="Step" Value="0.45" />
|
||||
<Value Row="126" Mode="Step" Value="0.45" />
|
||||
<Value Row="186" Mode="EaseOut" Value="0" />
|
||||
<Value Row="189" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Radius">
|
||||
<Value Row="58" Mode="Step" Value="0.1" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Color_x">
|
||||
<Value Row="58" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Color_y">
|
||||
<Value Row="58" Mode="Step" Value="-0.04" />
|
||||
</Channel>
|
||||
<Channel Name="Line2Color_z">
|
||||
<Value Row="58" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="SizeY">
|
||||
<Value Row="0" Mode="Step" Value="0.5" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Start_x">
|
||||
<Value Row="46" Mode="Step" Value="-3" />
|
||||
<Value Row="54" Mode="Step" Value="-3" />
|
||||
<Value Row="86" Mode="Linear" Value="-3" />
|
||||
<Value Row="103" Mode="Step" Value="0.6" />
|
||||
<Value Row="104" Mode="Step" Value="0.6" />
|
||||
<Value Row="150" Mode="EaseIn" Value="1.2" />
|
||||
<Value Row="157" Mode="Step" Value="2" />
|
||||
<Value Row="158" Mode="EaseOut" Value="2" />
|
||||
<Value Row="168" Mode="Step" Value="0.6" />
|
||||
<Value Row="169" Mode="Step" Value="0.6" />
|
||||
<Value Row="240" Mode="Step" Value="2.5" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Start_y">
|
||||
<Value Row="46" Mode="Step" Value="0.5" />
|
||||
<Value Row="54" Mode="Step" Value="0.5" />
|
||||
<Value Row="86" Mode="Step" Value="0.5" />
|
||||
<Value Row="240" Mode="Step" Value="5" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Start_z">
|
||||
<Value Row="46" Mode="Step" Value="0" />
|
||||
<Value Row="54" Mode="Step" Value="0" />
|
||||
<Value Row="86" Mode="Linear" Value="0" />
|
||||
<Value Row="103" Mode="Step" Value="1" />
|
||||
<Value Row="104" Mode="Step" Value="1" />
|
||||
<Value Row="150" Mode="EaseIn" Value="2" />
|
||||
<Value Row="157" Mode="Step" Value="-1" />
|
||||
<Value Row="158" Mode="EaseOut" Value="-1" />
|
||||
<Value Row="168" Mode="Step" Value="-1" />
|
||||
<Value Row="169" Mode="Step" Value="-1" />
|
||||
<Value Row="240" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Intensity">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="46" Mode="EaseIn" Value="0" />
|
||||
<Value Row="53" Mode="Step" Value="5" />
|
||||
<Value Row="54" Mode="EaseOut" Value="5" />
|
||||
<Value Row="57" Mode="Step" Value="0" />
|
||||
<Value Row="58" Mode="EaseOut" Value="5" />
|
||||
<Value Row="61" Mode="Step" Value="0.01" />
|
||||
<Value Row="62" Mode="Step" Value="0.01" />
|
||||
<Value Row="64" Mode="Step" Value="5" />
|
||||
<Value Row="82" Mode="EaseOut" Value="5" />
|
||||
<Value Row="85" Mode="Step" Value="0.1" />
|
||||
<Value Row="86" Mode="Step" Value="0.1" />
|
||||
<Value Row="118" Mode="EaseOut" Value="5" />
|
||||
<Value Row="121" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="EaseOut" Value="5" />
|
||||
<Value Row="125" Mode="Step" Value="0.01" />
|
||||
<Value Row="126" Mode="Step" Value="0.01" />
|
||||
<Value Row="128" Mode="Step" Value="5" />
|
||||
<Value Row="146" Mode="EaseOut" Value="5" />
|
||||
<Value Row="149" Mode="Step" Value="0.1" />
|
||||
<Value Row="150" Mode="Step" Value="0.1" />
|
||||
<Value Row="182" Mode="EaseOut" Value="5" />
|
||||
<Value Row="185" Mode="Step" Value="0" />
|
||||
<Value Row="186" Mode="EaseOut" Value="5" />
|
||||
<Value Row="189" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="Step" Value="0" />
|
||||
<Value Row="240" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Line3End_x">
|
||||
<Value Row="46" Mode="Step" Value="-0.26" />
|
||||
<Value Row="54" Mode="EaseOut" Value="-0.26" />
|
||||
<Value Row="57" Mode="Step" Value="0" />
|
||||
<Value Row="58" Mode="EaseOut" Value="0" />
|
||||
<Value Row="61" Mode="Step" Value="-0.26" />
|
||||
<Value Row="62" Mode="Step" Value="-0.26" />
|
||||
<Value Row="94" Mode="Cubic" Value="-0.26" />
|
||||
<Value Row="117" Mode="Step" Value="0.5" />
|
||||
<Value Row="118" Mode="EaseOut" Value="0.5" />
|
||||
<Value Row="121" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="EaseOut" Value="0" />
|
||||
<Value Row="125" Mode="Step" Value="-0.25" />
|
||||
<Value Row="126" Mode="Step" Value="-0.25" />
|
||||
<Value Row="128" Mode="Linear" Value="-0.25" />
|
||||
<Value Row="146" Mode="Step" Value="0.5" />
|
||||
<Value Row="147" Mode="Step" Value="0.5" />
|
||||
<Value Row="158" Mode="Cubic" Value="0.5" />
|
||||
<Value Row="181" Mode="Step" Value="-0.25" />
|
||||
<Value Row="182" Mode="EaseOut" Value="-0.25" />
|
||||
<Value Row="185" Mode="Step" Value="0" />
|
||||
<Value Row="186" Mode="EaseOut" Value="0" />
|
||||
<Value Row="189" Mode="Step" Value="0.5" />
|
||||
<Value Row="190" Mode="Step" Value="0.5" />
|
||||
<Value Row="240" Mode="Linear" Value="2.5" />
|
||||
<Value Row="247" Mode="Step" Value="2" />
|
||||
<Value Row="248" Mode="Linear" Value="2" />
|
||||
<Value Row="255" Mode="Step" Value="3" />
|
||||
</Channel>
|
||||
<Channel Name="Line3End_y">
|
||||
<Value Row="46" Mode="Step" Value="0.1" />
|
||||
<Value Row="54" Mode="EaseOut" Value="0.1" />
|
||||
<Value Row="57" Mode="Step" Value="0.75" />
|
||||
<Value Row="58" Mode="EaseOut" Value="0.75" />
|
||||
<Value Row="61" Mode="Step" Value="0.1" />
|
||||
<Value Row="62" Mode="Step" Value="0.1" />
|
||||
<Value Row="118" Mode="EaseOut" Value="0.1" />
|
||||
<Value Row="121" Mode="Step" Value="0.75" />
|
||||
<Value Row="122" Mode="EaseOut" Value="0.75" />
|
||||
<Value Row="125" Mode="Step" Value="0.1" />
|
||||
<Value Row="126" Mode="Step" Value="0.1" />
|
||||
<Value Row="182" Mode="EaseOut" Value="0.1" />
|
||||
<Value Row="185" Mode="Step" Value="1" />
|
||||
<Value Row="186" Mode="EaseOut" Value="1" />
|
||||
<Value Row="189" Mode="Step" Value="0.1" />
|
||||
<Value Row="190" Mode="Step" Value="0.1" />
|
||||
<Value Row="240" Mode="Step" Value="0.3" />
|
||||
</Channel>
|
||||
<Channel Name="Line3End_z">
|
||||
<Value Row="46" Mode="Step" Value="0.45" />
|
||||
<Value Row="54" Mode="EaseOut" Value="0.45" />
|
||||
<Value Row="57" Mode="Step" Value="0" />
|
||||
<Value Row="58" Mode="EaseOut" Value="0" />
|
||||
<Value Row="61" Mode="Step" Value="-0.45" />
|
||||
<Value Row="62" Mode="Step" Value="-0.45" />
|
||||
<Value Row="64" Mode="Linear" Value="-0.45" />
|
||||
<Value Row="81" Mode="Step" Value="0.45" />
|
||||
<Value Row="82" Mode="Step" Value="0.45" />
|
||||
<Value Row="94" Mode="Cubic" Value="0.45" />
|
||||
<Value Row="117" Mode="Step" Value="0" />
|
||||
<Value Row="118" Mode="EaseOut" Value="0" />
|
||||
<Value Row="121" Mode="Step" Value="0" />
|
||||
<Value Row="122" Mode="EaseOut" Value="0" />
|
||||
<Value Row="125" Mode="Step" Value="0.45" />
|
||||
<Value Row="126" Mode="Step" Value="0.45" />
|
||||
<Value Row="128" Mode="Linear" Value="0.45" />
|
||||
<Value Row="146" Mode="Step" Value="0" />
|
||||
<Value Row="147" Mode="Step" Value="0" />
|
||||
<Value Row="158" Mode="Cubic" Value="0" />
|
||||
<Value Row="181" Mode="Step" Value="-0.4" />
|
||||
<Value Row="182" Mode="EaseOut" Value="-0.4" />
|
||||
<Value Row="185" Mode="Step" Value="0" />
|
||||
<Value Row="186" Mode="EaseOut" Value="0" />
|
||||
<Value Row="189" Mode="Step" Value="0" />
|
||||
<Value Row="190" Mode="Step" Value="0" />
|
||||
<Value Row="240" Mode="Linear" Value="-0.5" />
|
||||
<Value Row="247" Mode="Step" Value="0" />
|
||||
<Value Row="248" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Radius">
|
||||
<Value Row="50" Mode="Step" Value="0.1" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Color_x">
|
||||
<Value Row="50" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Color_y">
|
||||
<Value Row="50" Mode="Step" Value="-0.04" />
|
||||
</Channel>
|
||||
<Channel Name="Line3Color_z">
|
||||
</Channel>
|
||||
<Channel Name="ThicknessY">
|
||||
<Value Row="0" Mode="Step" Value="0.2" />
|
||||
</Channel>
|
||||
<Channel Name="camPos_x">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="191" Mode="Step" Value="0" />
|
||||
<Value Row="192" Mode="EaseIn" Value="0" />
|
||||
<Value Row="255" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="camPos_y">
|
||||
<Value Row="0" Mode="Step" Value="2" />
|
||||
<Value Row="191" Mode="Step" Value="2" />
|
||||
<Value Row="192" Mode="EaseIn" Value="2" />
|
||||
<Value Row="255" Mode="Step" Value="1.5" />
|
||||
</Channel>
|
||||
<Channel Name="camPos_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="191" Mode="Step" Value="0" />
|
||||
<Value Row="192" Mode="EaseIn" Value="0" />
|
||||
<Value Row="255" Mode="Step" Value="-2" />
|
||||
</Channel>
|
||||
<Channel Name="AnimX">
|
||||
</Channel>
|
||||
<Channel Name="camAt_x">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="191" Mode="Step" Value="0" />
|
||||
<Value Row="192" Mode="EaseIn" Value="0" />
|
||||
<Value Row="255" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="camAt_y">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="191" Mode="Step" Value="0" />
|
||||
<Value Row="192" Mode="EaseIn" Value="0" />
|
||||
<Value Row="255" Mode="Step" Value="0.5" />
|
||||
</Channel>
|
||||
<Channel Name="camAt_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
<Value Row="191" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="AnimY">
|
||||
</Channel>
|
||||
<Channel Name="PosX_x">
|
||||
</Channel>
|
||||
<Channel Name="PosX_y">
|
||||
</Channel>
|
||||
<Channel Name="PosX_z">
|
||||
</Channel>
|
||||
<Channel Name="camFade">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
<Value Row="248" Mode="Cubic" Value="1" />
|
||||
<Value Row="255" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="PosY_x">
|
||||
<Value Row="0" Mode="Step" Value="2.5" />
|
||||
</Channel>
|
||||
<Channel Name="PosY_y">
|
||||
<Value Row="0" Mode="Step" Value="0.1" />
|
||||
</Channel>
|
||||
<Channel Name="PosY_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="_b">
|
||||
</Channel>
|
||||
<Channel Name="RotAxisX_x">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="RotAxisX_y">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="RotAxisX_z">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="RotAngleX">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="RotAxisY_x">
|
||||
<Value Row="0" Mode="Step" Value="1" />
|
||||
</Channel>
|
||||
<Channel Name="RotAxisY_y">
|
||||
<Value Row="0" Mode="Step" Value="0" />
|
||||
</Channel>
|
||||
<Channel Name="RotAxisY_z">
|
||||
</Channel>
|
||||
<Channel Name="RotAngleY">
|
||||
<Value Row="0" Mode="Step" Value="0.78" />
|
||||
</Channel>
|
||||
</Audio>
|
||||
35
netpoet-coop-8k/src/intro/intro/update.h
Normal file
35
netpoet-coop-8k/src/intro/intro/update.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#pragma code_seg(".IntroUpdate")
|
||||
void IntroUpdate(float fTime)
|
||||
{
|
||||
cbuffer.oTime = cbuffer.iTime;
|
||||
cbuffer.iTime = fTime;
|
||||
cbuffer.iFrame++;
|
||||
context->UpdateSubresource(constantBuffer, 0, nullptr, &cbuffer, 0, 0);
|
||||
|
||||
context->CSSetUnorderedAccessViews(0, 1, &backBufferUAV, reinterpret_cast<const UINT*>(zero));
|
||||
context->CSSetUnorderedAccessViews(1, 1, &blueNoiseUAV, reinterpret_cast<const UINT*>(zero));
|
||||
context->CSSetShaderResources(0, 1, &lastFrameSRV);
|
||||
context->CSSetShader(cs_BlueNoise, nullptr, 0);
|
||||
context->CSSetConstantBuffers(0, 1, &constantBuffer);
|
||||
context->CSSetConstantBuffers(1, 1, &SyncBuffer);
|
||||
context->Dispatch(BLUENOISE_DIMENSIONS / 8, BLUENOISE_DIMENSIONS / 8, BLUENOISE_FRAMES / 4);
|
||||
|
||||
context->CSSetShader(cs_Draw, nullptr, 0);
|
||||
context->Dispatch(SCREENWIDTH / 16, SCREENHEIGHT / 16, 1);
|
||||
context->CSSetUnorderedAccessViews(0, 8, (ID3D11UnorderedAccessView* const*)zero, NULL);
|
||||
context->CSSetShaderResources(0, 8, (ID3D11ShaderResourceView* const*)zero);
|
||||
context->CopySubresourceRegion(lastFrame, 0, 0, 0, 0, backBufferTexture, 0, NULL);
|
||||
|
||||
swapChain->Present(0, 0);
|
||||
PeekMessage(0, 0, 0, 0, PM_REMOVE);
|
||||
|
||||
cbuffer.oldCamPos_x = Sync->camPos_x;
|
||||
cbuffer.oldCamPos_y = Sync->camPos_y;
|
||||
cbuffer.oldCamPos_z = Sync->camPos_z;
|
||||
cbuffer.oldCamAt_x = Sync->camAt_x;
|
||||
cbuffer.oldCamAt_y = Sync->camAt_y;
|
||||
cbuffer.oldCamAt_z = Sync->camAt_z;
|
||||
cbuffer.oldCamRoll = Sync->camRoll;
|
||||
}
|
||||
19
netpoet-coop-8k/src/intro/main.cpp
Normal file
19
netpoet-coop-8k/src/intro/main.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "framework/framework.h"
|
||||
#include "intro/data.h"
|
||||
#include "intro/init.h"
|
||||
#include "intro/update.h"
|
||||
|
||||
int _cdecl main(int argc, char* argv[])
|
||||
{
|
||||
FrameworkInit();
|
||||
|
||||
do
|
||||
{
|
||||
FrameworkUpdate();
|
||||
} while (FrameworkContinueExecuting());
|
||||
|
||||
FrameworkDispose();
|
||||
ExitProcess(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
53
netpoet-coop-8k/src/intro/shaders/aces.hlsl
Normal file
53
netpoet-coop-8k/src/intro/shaders/aces.hlsl
Normal file
@@ -0,0 +1,53 @@
|
||||
float3 linear_srgb(float3 x)
|
||||
{
|
||||
return lerp(1.055 * pow(x, 1. / 2.4) - 0.055, 12.92 * x, step(x, 0.0031308));
|
||||
}
|
||||
|
||||
static const float3x3 AP1_2_XYZ_MAT =
|
||||
{
|
||||
0.6624541811, 0.1340042065, 0.1561876870,
|
||||
0.2722287168, 0.6740817658, 0.0536895174,
|
||||
-0.0055746495, 0.0040607335, 1.0103391003
|
||||
};
|
||||
|
||||
static const float3x3 XYZ_2_AP1_MAT =
|
||||
{
|
||||
1.6410233797, -0.3248032942, -0.2364246952,
|
||||
-0.6636628587, 1.6153315917, 0.0167563477,
|
||||
0.0117218943, -0.0082844420, 0.9883948585
|
||||
};
|
||||
|
||||
static const float3x3 D60_2_D65_CAT =
|
||||
{
|
||||
0.98722400, -0.00611327, 0.0159533,
|
||||
-0.00759836, 1.00186000, 0.0053302,
|
||||
0.00307257, -0.00509595, 1.0816800
|
||||
};
|
||||
|
||||
static const float3x3 XYZ_2_REC2020_MAT =
|
||||
{
|
||||
1.7166511880, -0.3556707838, -0.2533662814,
|
||||
-0.6666843518, 1.6164812366, 0.0157685458,
|
||||
0.0176398574, -0.0427706133, 0.9421031212
|
||||
};
|
||||
|
||||
static const float SATURATION = 1.2;
|
||||
static const float EXPOSURE = 1.2;
|
||||
|
||||
// ACES curve fit by Stephen Hill
|
||||
float3 ToneMap(float3 color)
|
||||
{
|
||||
//return color;
|
||||
//return linear_srgb(color);
|
||||
float3 v = max(0, mul(float3x3(0.59719, 0.35458, 0.04823, 0.07600, 0.90834, 0.01566, 0.02840, 0.13383, 0.83777), color * EXPOSURE));
|
||||
float3 a = v * (v + 0.0245786f) - 0.000090537f;
|
||||
float3 b = v * (0.983729f * v + 0.4329510f) + 0.238081f;
|
||||
color = a / b;
|
||||
|
||||
color = lerp(dot(color, float3(0.272229, 0.674082, 0.0536895)), color, SATURATION);
|
||||
color = mul(AP1_2_XYZ_MAT, color);
|
||||
color = mul(D60_2_D65_CAT, color);
|
||||
color = mul(XYZ_2_REC2020_MAT, color);
|
||||
//return (color);
|
||||
return linear_srgb(max(0, color));
|
||||
}
|
||||
23
netpoet-coop-8k/src/intro/shaders/bluenoise.hlsl
Normal file
23
netpoet-coop-8k/src/intro/shaders/bluenoise.hlsl
Normal file
@@ -0,0 +1,23 @@
|
||||
//[entrypoint(cs)]
|
||||
[numthreads(8, 8, 4)]void cs_BlueNoise(uint3 i : SV_DispatchThreadID)
|
||||
{
|
||||
int2 p = (i.xy + i.z * int2(113, 127));
|
||||
|
||||
int level = 19;
|
||||
int d = 0;
|
||||
for (int k = 0; k < level; k++)
|
||||
{
|
||||
int n = level - k - 1;
|
||||
int2 r = (p >> n) & 1;
|
||||
d += ((3 * r.x) ^ r.y) << (2 * n);
|
||||
if (r.y == 0)
|
||||
{
|
||||
if (r.x == 1)
|
||||
{
|
||||
p = (1 << n) - 1 - p;
|
||||
}
|
||||
p = p.yx;
|
||||
}
|
||||
}
|
||||
oNoise[i] = float(0x80000000u + 2654435789u * (uint(d) % (1u << level)) >> 24) / 256.0;
|
||||
}
|
||||
206
netpoet-coop-8k/src/intro/shaders/intro.hlsl
Normal file
206
netpoet-coop-8k/src/intro/shaders/intro.hlsl
Normal file
@@ -0,0 +1,206 @@
|
||||
cbuffer CB : register(b0)
|
||||
{
|
||||
float3 oldCamPos;
|
||||
float iTime;
|
||||
float3 oldCamAt;
|
||||
float oTime;
|
||||
uint iFrame;
|
||||
float oldCamRoll;
|
||||
uint _a;
|
||||
uint _b;
|
||||
};
|
||||
|
||||
//[syncstruct(audio)]
|
||||
struct Audio
|
||||
{
|
||||
float3 ConePos;
|
||||
float ConeOpening;
|
||||
|
||||
float3 ConeDir;
|
||||
float ConeIntensity;
|
||||
|
||||
float3 ConeColor;
|
||||
float camRoll;
|
||||
|
||||
float3 Point1Pos;
|
||||
float Point1Radius;
|
||||
|
||||
float3 Point1Color;
|
||||
float Point1Intensity;
|
||||
|
||||
float3 Point2Pos;
|
||||
float Point2Radius;
|
||||
|
||||
float3 Point2Color;
|
||||
float Point2Intensity;
|
||||
|
||||
float3 Line1Start;
|
||||
float Line1Intensity;
|
||||
|
||||
float3 Line1End;
|
||||
float Line1Radius;
|
||||
|
||||
float3 Line1Color;
|
||||
float SizeX;
|
||||
|
||||
float3 Line2Start;
|
||||
float Line2Intensity;
|
||||
|
||||
float3 Line2End;
|
||||
float Line2Radius;
|
||||
|
||||
float3 Line2Color;
|
||||
float SizeY;
|
||||
|
||||
float3 Line3Start;
|
||||
float Line3Intensity;
|
||||
|
||||
float3 Line3End;
|
||||
float Line3Radius;
|
||||
|
||||
float3 Line3Color;
|
||||
float ThicknessY;
|
||||
|
||||
float3 camPos;
|
||||
float AnimX;
|
||||
|
||||
float3 camAt;
|
||||
float AnimY;
|
||||
|
||||
float3 PosX;
|
||||
float camFade;
|
||||
|
||||
float3 PosY;
|
||||
float _b;
|
||||
|
||||
float3 RotAxisX;
|
||||
float RotAngleX;
|
||||
|
||||
float3 RotAxisY;
|
||||
float RotAngleY;
|
||||
};
|
||||
|
||||
cbuffer CA : register(b1)
|
||||
{
|
||||
Audio audio;
|
||||
};
|
||||
|
||||
RWTexture2D<float4> o0 : register(u0);
|
||||
RWTexture2DArray<float> oNoise : register(u1);
|
||||
Texture2D<float4> lastFrame : register(t0);
|
||||
|
||||
#include "bluenoise.hlsl"
|
||||
#include "aces.hlsl"
|
||||
#include "sdf.hlsl"
|
||||
#include "taa.hlsl"
|
||||
|
||||
static const float MAT_LASER1 = 3;
|
||||
static const float MAT_LASER2 = 4;
|
||||
static const float MAT_LASER3 = 5;
|
||||
static const float MAT_POINT1 = 6;
|
||||
static const float MAT_POINT2 = 7;
|
||||
static const float MAT_SPOTLIGHT = 8;
|
||||
static const float MAT_OBJ = 20;
|
||||
static const float MAT_PRISM = 21;
|
||||
|
||||
float obj(in float3 pos)
|
||||
{
|
||||
pR(pos, quaternion(audio.RotAxisX, audio.RotAngleX));
|
||||
pR(pos.xy, .608);
|
||||
pR(pos.zy, .7934);
|
||||
pos -= audio.PosX;
|
||||
return sdTetrahedron(pos, audio.SizeX);
|
||||
}
|
||||
|
||||
float prism(in float3 pos)
|
||||
{
|
||||
pR(pos, quaternion(audio.RotAxisY, audio.RotAngleY));
|
||||
pos -= audio.PosY;
|
||||
return sdTriPrism(pos, float2(audio.SizeY, audio.ThicknessY)) - .01;
|
||||
}
|
||||
|
||||
float2 map(in float3 pos)
|
||||
{
|
||||
float2 res = float2(pos.y, 0.0);
|
||||
res = opU(res, float2(obj(pos), MAT_OBJ));
|
||||
res = opU(res, float2(prism(pos), MAT_PRISM));
|
||||
return res;
|
||||
}
|
||||
|
||||
#include "render.hlsl"
|
||||
|
||||
float3x3 setCamera(in float3 ro, in float3 ta, float cr)
|
||||
{
|
||||
float3 cw = normalize(ta - ro);
|
||||
float3 cp = abs(cw.y) > max(abs(cw.x), abs(cw.z)) ? float3(sin(cr), 0.0, cos(cr)) : float3(sin(cr), cos(cr), 0.0);
|
||||
float3 cu = normalize(cross(cp, cw));
|
||||
float3 cv = (cross(cu, cw));
|
||||
return float3x3(cu, cv, cw);
|
||||
}
|
||||
|
||||
//[entrypoint(cs)]
|
||||
[numthreads(16, 16, 1)]void cs_Draw(uint3 i : SV_DispatchThreadID)
|
||||
{
|
||||
int2 iResolution;
|
||||
o0.GetDimensions(iResolution.x, iResolution.y);
|
||||
const float2 fragCoord = i.xy;
|
||||
float time = iTime;
|
||||
|
||||
float3 s2;
|
||||
oNoise.GetDimensions(s2.x, s2.y, s2.z);
|
||||
float bluenoise = (oNoise.Load(int3(i.xy % s2.xy, iFrame % s2.z)).r - 0.5);
|
||||
|
||||
//ta.xy += 100* bluenoise/iResolution;
|
||||
// camera-to-world transformation
|
||||
float3x3 ca = setCamera(audio.camPos, audio.camAt, audio.camRoll);
|
||||
|
||||
float3 tot = 0;
|
||||
float2 p = (2.0*(fragCoord+bluenoise)-iResolution.xy)/iResolution.y;
|
||||
|
||||
// focal length
|
||||
const float fl = 2.5;
|
||||
|
||||
// ray direction
|
||||
float3 ro = audio.camPos;
|
||||
float3 rd = mul(normalize(float3(p, fl)), ca);
|
||||
|
||||
float3 hit, nor, col = 0, q;
|
||||
// render
|
||||
for (int j = 0; j < 4 && render(ro, rd, bluenoise, hit, nor, col, q); ++j)
|
||||
{
|
||||
float3 nor2, hit2, colR = 0, colG = 0, colB = 0, q2;
|
||||
render(q, refract(-nor, -rd, 0.7), bluenoise, hit2, nor2, colR, q2);
|
||||
render(ro = q, rd = refract(-nor, -rd, 0.8), bluenoise, hit2, nor2, colG, q2);
|
||||
render(q, refract(-nor, -rd, 0.9), bluenoise, hit2, nor2, colB, q2);
|
||||
col += max(0, colR * float3(.7,.0,-.1) + colG * float3(.4,1,.4) + colB * float3(-.1,.0,.7));
|
||||
}
|
||||
|
||||
// gain
|
||||
//col = col*15.5/(3.0+col);
|
||||
|
||||
// gamma
|
||||
col = ToneMap(col);
|
||||
|
||||
tot += col;
|
||||
|
||||
// old camera
|
||||
// camera-to-world transformation
|
||||
float3x3 oldCam3 = setCamera(oldCamPos, oldCamAt, oldCamRoll);
|
||||
float projX = -dot(oldCam3[0], oldCamPos);
|
||||
float projY = -dot(oldCam3[1], oldCamPos);
|
||||
float projZ = -dot(oldCam3[2], oldCamPos);
|
||||
float4x4 oldCam = float4x4(float4(oldCam3[0], projX), float4(oldCam3[1], projY), float4(oldCam3[2], projZ), float4(0, 0, 0, 1));
|
||||
|
||||
// world space
|
||||
float4 wpos = float4(hit, 1.0);
|
||||
// camera space
|
||||
float3 cpos = (mul(oldCam, wpos)).xyz; // note inverse multiply
|
||||
// ndc space
|
||||
float2 npos = fl * cpos.xy / cpos.z;
|
||||
// screen space
|
||||
float2 spos = 0.5 + 0.5*npos*float2((float)iResolution.y/iResolution.x,1.0);
|
||||
|
||||
taa(tot, spos, iResolution);
|
||||
|
||||
o0[i.xy] = float4(tot * audio.camFade, 1); // float4(uv, 0, 1);
|
||||
}
|
||||
267
netpoet-coop-8k/src/intro/shaders/render.hlsl
Normal file
267
netpoet-coop-8k/src/intro/shaders/render.hlsl
Normal file
@@ -0,0 +1,267 @@
|
||||
|
||||
float calcSoftshadow(in float3 ro, in float3 rd, in float mint, in float tmax, in float bluenoise)
|
||||
{
|
||||
float res = 1.0;
|
||||
float t = mint;
|
||||
t += (.5+bluenoise)*.1;
|
||||
for( int i=0; i<16; i++ )
|
||||
{
|
||||
float h = map(ro + rd*saturate(t)).x;
|
||||
res = min( res, 8.0*h/t );
|
||||
t += clamp( h, 0.02, 0.30 );
|
||||
if( h<0.005 || t>tmax ) break;
|
||||
}
|
||||
return clamp( res, 0.0, 1.0 );
|
||||
}
|
||||
|
||||
void laser(inout float2 h, inout float3 p, in float3 start, in float3 end, in float radius, in float bluenoise, in float3 color, in float intensity, in float mat, inout float3 scatter)
|
||||
{
|
||||
if (intensity <= 0)
|
||||
return;
|
||||
h = opU(h, float2(sdCapsule(p, start, end, radius * .01 * intensity), mat));
|
||||
float s = sdCapsule(p, start, end, radius);
|
||||
if (s < 0)
|
||||
{
|
||||
float3 ld = normalize(end - start);
|
||||
float proj = dot(p - start, ld);
|
||||
float3 lp = start + ld * proj;
|
||||
float len = max(length(lp - p), length(end - p));
|
||||
|
||||
float shadow = 1; //calcSoftshadow(p, normalize(ld), 0.01, len, bluenoise);
|
||||
scatter += color * -s * intensity * 0.1 * shadow / (len * len);
|
||||
s = .1;
|
||||
}
|
||||
else
|
||||
s = max(s, 0.1 + (.5 + bluenoise) * .1 * radius * intensity);
|
||||
h.x = min(h.x, s);
|
||||
}
|
||||
|
||||
void torch(inout float2 h, inout float3 p, in float3 start, in float3 end, in float radius, in float bluenoise, in float3 color, in float intensity, in float mat, inout float3 scatter)
|
||||
{
|
||||
if (intensity <= 0)
|
||||
return;
|
||||
h = opU(h, float2(sdSphere(p - start - .1 * normalize(end - start), .03), mat));
|
||||
float s = sdCappedCone(p, start, end, 0, radius);
|
||||
if (s < 0)
|
||||
{
|
||||
float3 ld = start - p;
|
||||
float len = length(ld);
|
||||
float shadow = calcSoftshadow(p, normalize(ld), 0.01, len, bluenoise);
|
||||
scatter += color * -s * intensity * 0.5 * shadow / (len * len);
|
||||
s = .1;
|
||||
}
|
||||
else
|
||||
s = max(s, 0.1 + (.5 + bluenoise) * .1 * radius * intensity);
|
||||
h.x = min(h.x, s);
|
||||
}
|
||||
|
||||
void lantern(inout float2 h, inout float3 p, in float3 pos, in float radius, in float bluenoise, in float3 color, in float intensity, in float mat, inout float3 scatter)
|
||||
{
|
||||
if (intensity <= 0)
|
||||
return;
|
||||
h = opU(h, float2(sdSphere(p - pos, radius * .01), mat));
|
||||
float s = sdSphere(p - pos, radius);
|
||||
if (s < 0)
|
||||
{
|
||||
float3 ld = pos - p;
|
||||
float len = length(ld);
|
||||
float shadow = calcSoftshadow(p, normalize(ld), 0.01, len, bluenoise);
|
||||
scatter += color * -s * intensity * 0.01 * shadow / (len * len);
|
||||
s = .1;
|
||||
}
|
||||
else
|
||||
s = max(s, 0.1 + (.5 + bluenoise) * .1 * radius * intensity);
|
||||
h.x = min(h.x, s);
|
||||
}
|
||||
|
||||
float2 raycast(in float3 ro, in float3 rd, in float bluenoise, out float3 scatter)
|
||||
{
|
||||
float2 res = float2(-1.0, -1.0);
|
||||
|
||||
float tmin = 0.0;
|
||||
float tmax = 20.0;
|
||||
|
||||
float3 coneDir = normalize(audio.ConeDir);
|
||||
// raytrace floor plane
|
||||
float tp2 = (0.0 - audio.ConePos.y) / coneDir.y;
|
||||
float3 coneTarget = audio.ConePos + coneDir;
|
||||
if (tp2 > 0.0)
|
||||
{
|
||||
tp2 *= 10;
|
||||
coneTarget = audio.ConePos + tp2 * coneDir;
|
||||
}
|
||||
float coneRadius = tp2 * tan(asin(audio.ConeOpening));
|
||||
|
||||
// raymarch primitives
|
||||
tmin -= (.5+bluenoise)*.5;
|
||||
float t = tmin;
|
||||
float3 p = ro;
|
||||
float3 line1Target = audio.Line1End;
|
||||
float3 ld = normalize(line1Target - audio.Line1Start);
|
||||
for (int j = 0; j < 24; j++)
|
||||
{
|
||||
float2 h = map(p = audio.Line1Start + ld * t);
|
||||
|
||||
if (abs(h.x) < (0.01 * t))
|
||||
{
|
||||
line1Target = p;
|
||||
break;
|
||||
}
|
||||
t += h.x;
|
||||
}
|
||||
t = tmin;
|
||||
scatter = 0;
|
||||
for (int i = 0; i < 150 && t < tmax; i++)
|
||||
{
|
||||
float2 h = map(p = ro + rd * t);
|
||||
|
||||
laser(h, p, audio.Line1Start, line1Target, audio.Line1Radius, bluenoise, audio.Line1Color, audio.Line1Intensity, MAT_LASER1, scatter);
|
||||
laser(h, p, audio.Line2Start, audio.Line2End, audio.Line2Radius, bluenoise, audio.Line2Color, audio.Line2Intensity, MAT_LASER2, scatter);
|
||||
laser(h, p, audio.Line3Start, audio.Line3End, audio.Line3Radius, bluenoise, audio.Line3Color, audio.Line3Intensity, MAT_LASER3, scatter);
|
||||
lantern(h, p, audio.Point1Pos, audio.Point1Radius, bluenoise, audio.Point1Color, audio.Point1Intensity, MAT_POINT1, scatter);
|
||||
lantern(h, p, audio.Point2Pos, audio.Point2Radius, bluenoise, audio.Point2Color, audio.Point2Intensity, MAT_POINT2, scatter);
|
||||
torch(h, p, audio.ConePos, coneTarget, coneRadius, bluenoise, audio.ConeColor, audio.ConeIntensity, MAT_SPOTLIGHT, scatter);
|
||||
|
||||
if (abs(h.x) < (0.001 * t))
|
||||
{
|
||||
res = float2(t, h.y);
|
||||
break;
|
||||
}
|
||||
t += h.x;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// https://iquilezles.org/articles/normalsSDF
|
||||
float3 calcNormal(in float3 pos)
|
||||
{
|
||||
// inspired by tdhooper and klems - a way to prevent the compiler from inlining map() 4 times
|
||||
float3 n = 0;
|
||||
for (int i = min(iFrame,0); i < 4; i++)
|
||||
{
|
||||
float3 e = float3(((i + 3) >> 1) & 1, i >> 1, i & 1) - .5;
|
||||
n += e * map(pos + .005 * e).x;
|
||||
}
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
// https://iquilezles.org/articles/nvscene2008/rwwtt.pdf
|
||||
float calcAO(in float3 pos, in float3 nor)
|
||||
{
|
||||
float occ = 0.0;
|
||||
float sca = 1.0;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
float h = 0.01 + 0.12 * float(i) / 4.0;
|
||||
float d = map(pos + h * nor).x;
|
||||
occ += (h - d) * sca;
|
||||
sca *= 0.95;
|
||||
if (occ > 0.35)
|
||||
break;
|
||||
}
|
||||
return clamp(1.0 - 3.0 * occ, 0.0, 1.0) * (0.5 + 0.5 * nor.y);
|
||||
}
|
||||
|
||||
// https://iquilezles.org/articles/checkerfiltering
|
||||
float checkersGradBox(in float2 p)
|
||||
{
|
||||
// filter kernel
|
||||
float2 w = 0.001;
|
||||
// analytical integral (box filter)
|
||||
float2 i = 2.0 * (abs(frac((p - 0.5 * w) * 0.5) - 0.5) - abs(frac((p + 0.5 * w) * 0.5) - 0.5)) / w;
|
||||
// xor pattern
|
||||
return 0.5 - 0.5 * i.x * i.y;
|
||||
}
|
||||
|
||||
bool render(in float3 ro, in float3 rd, in float bluenoise, out float3 pos, out float3 nor, inout float3 color, out float3 q)
|
||||
{
|
||||
// background
|
||||
float3 background = 0.01;
|
||||
float3 col = background;
|
||||
nor = 0;
|
||||
|
||||
// raycast scene
|
||||
float3 scatter;
|
||||
float2 res = raycast(ro, rd, bluenoise, scatter);
|
||||
float t = res.x;
|
||||
float m = res.y;
|
||||
bool refl = false;
|
||||
pos = q = ro;
|
||||
if (m >= 0.0)
|
||||
{
|
||||
pos += t * rd;
|
||||
nor = (m < 1.5) ? float3(0.0, 1.0, 0.0) : calcNormal(pos);
|
||||
|
||||
// material
|
||||
if (m < 1.5)
|
||||
{
|
||||
// project pixel footprint into the plane
|
||||
float f = checkersGradBox(3.0 * pos.xz);
|
||||
col = 0.15 + f * 0.05;
|
||||
}
|
||||
else if (m == MAT_OBJ)
|
||||
{
|
||||
col = 1;
|
||||
}
|
||||
else if (m == MAT_LASER1)
|
||||
{
|
||||
col = max(1, 100 * audio.Line1Intensity) * audio.Line1Color;
|
||||
}
|
||||
else if (m == MAT_LASER2)
|
||||
{
|
||||
col = max(1, 100 * audio.Line2Intensity) * audio.Line2Color;
|
||||
}
|
||||
else if (m == MAT_LASER3)
|
||||
{
|
||||
col = max(1, 100 * audio.Line3Intensity) * audio.Line3Color;
|
||||
}
|
||||
else if (m == MAT_POINT1)
|
||||
{
|
||||
col = 50 * audio.Point1Intensity * audio.Point1Color;
|
||||
}
|
||||
else if (m == MAT_POINT2)
|
||||
{
|
||||
col = 50 * audio.Point2Intensity * audio.Point2Color;
|
||||
}
|
||||
else if (m == MAT_SPOTLIGHT)
|
||||
{
|
||||
col = 10 * audio.ConeIntensity * audio.ConeColor;
|
||||
}
|
||||
else if (m == MAT_PRISM)
|
||||
{
|
||||
col += dot(nor, -rd)*.1;
|
||||
q = pos + nor * prism(pos) * 2;
|
||||
for (int i = 0; i < 32; ++i)
|
||||
{
|
||||
float t = prism(q);
|
||||
q += nor * max(0.05, -t);
|
||||
if (t >= .01)
|
||||
{
|
||||
nor = -calcNormal(q);
|
||||
refl = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// lighting
|
||||
float occ = calcAO(pos, nor);
|
||||
|
||||
float3 lin = 0;
|
||||
float gi = 0.1;
|
||||
|
||||
// sss
|
||||
{
|
||||
float dif = pow(clamp(1.0 + dot(nor, rd), 0.0, 1.0), 2.0);
|
||||
dif *= occ;
|
||||
dif = lerp(dif, 1, gi);
|
||||
lin += col * dif * float3(1.00, 1.00, 1.00);
|
||||
}
|
||||
|
||||
col = lerp(lin, background, 1.0 - exp(-0.001 * t * t * t));
|
||||
}
|
||||
col += (col + .5) * scatter;
|
||||
color += col;
|
||||
|
||||
return refl;
|
||||
}
|
||||
293
netpoet-coop-8k/src/intro/shaders/sdf.hlsl
Normal file
293
netpoet-coop-8k/src/intro/shaders/sdf.hlsl
Normal file
@@ -0,0 +1,293 @@
|
||||
float dot2(in float2 v)
|
||||
{
|
||||
return dot(v, v);
|
||||
}
|
||||
|
||||
float dot2(in float3 v)
|
||||
{
|
||||
return dot(v, v);
|
||||
}
|
||||
|
||||
float ndot(in float2 a, in float2 b)
|
||||
{
|
||||
return a.x * b.x - a.y * b.y;
|
||||
}
|
||||
|
||||
float sdPlane(float3 p)
|
||||
{
|
||||
return p.y;
|
||||
}
|
||||
|
||||
float sdSphere(float3 p, float s)
|
||||
{
|
||||
return length(p) - s;
|
||||
}
|
||||
|
||||
float sdTetrahedron(float3 p, float e)
|
||||
{
|
||||
return (max(abs(p.x+p.y)-p.z, abs(p.x-p.y)+p.z)-e)/sqrt(3);
|
||||
}
|
||||
|
||||
float sdBox(float3 p, float3 b)
|
||||
{
|
||||
float3 d = abs(p) - b;
|
||||
return min(max(d.x, max(d.y, d.z)), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdBoxFrame(float3 p, float3 b, float e)
|
||||
{
|
||||
p = abs(p) - b;
|
||||
float3 q = abs(p + e) - e;
|
||||
|
||||
return min(min(
|
||||
length(max(float3(p.x, q.y, q.z), 0.0)) + min(max(p.x, max(q.y, q.z)), 0.0),
|
||||
length(max(float3(q.x, p.y, q.z), 0.0)) + min(max(q.x, max(p.y, q.z)), 0.0)),
|
||||
length(max(float3(q.x, q.y, p.z), 0.0)) + min(max(q.x, max(q.y, p.z)), 0.0));
|
||||
}
|
||||
|
||||
float sdEllipsoid(in float3 p, in float3 r) // approximated
|
||||
{
|
||||
float k0 = length(p / r);
|
||||
float k1 = length(p / (r * r));
|
||||
return k0 * (k0 - 1.0) / k1;
|
||||
}
|
||||
|
||||
float sdTorus(float3 p, float2 t)
|
||||
{
|
||||
return length(float2(length(p.xz) - t.x, p.y)) - t.y;
|
||||
}
|
||||
|
||||
float sdCappedTorus(in float3 p, in float2 sc, in float ra, in float rb)
|
||||
{
|
||||
p.x = abs(p.x);
|
||||
float k = (sc.y * p.x > sc.x * p.y) ? dot(p.xy, sc) : length(p.xy);
|
||||
return sqrt(dot(p, p) + ra * ra - 2.0 * ra * k) - rb;
|
||||
}
|
||||
|
||||
float sdHexPrism(float3 p, float2 h)
|
||||
{
|
||||
float3 q = abs(p);
|
||||
|
||||
const float3 k = float3(-0.8660254, 0.5, 0.57735);
|
||||
p = abs(p);
|
||||
p.xy -= 2.0 * min(dot(k.xy, p.xy), 0.0) * k.xy;
|
||||
float2 d = float2(
|
||||
length(p.xy - float2(clamp(p.x, -k.z * h.x, k.z * h.x), h.x)) * sign(p.y - h.x),
|
||||
p.z - h.y);
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdOctogonPrism(in float3 p, in float r, float h)
|
||||
{
|
||||
const float3 k = float3(-0.9238795325, // sqrt(2+sqrt(2))/2
|
||||
0.3826834323, // sqrt(2-sqrt(2))/2
|
||||
0.4142135623); // sqrt(2)-1
|
||||
// reflections
|
||||
p = abs(p);
|
||||
p.xy -= 2.0 * min(dot(float2(k.x, k.y), p.xy), 0.0) * float2(k.x, k.y);
|
||||
p.xy -= 2.0 * min(dot(float2(-k.x, k.y), p.xy), 0.0) * float2(-k.x, k.y);
|
||||
// polygon side
|
||||
p.xy -= float2(clamp(p.x, -k.z * r, k.z * r), r);
|
||||
float2 d = float2(length(p.xy) * sign(p.y), p.z - h);
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdCapsule(float3 p, float3 a, float3 b, float r)
|
||||
{
|
||||
float3 pa = p - a, ba = b - a;
|
||||
float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);
|
||||
return length(pa - ba * h) - r;
|
||||
}
|
||||
|
||||
float sdTriPrism(float3 p, float2 h)
|
||||
{
|
||||
const float k = sqrt(3.0);
|
||||
h.x *= 0.5 * k;
|
||||
p.xy /= h.x;
|
||||
p.x = abs(p.x) - 1.0;
|
||||
p.y = p.y + 1.0 / k;
|
||||
if (p.x + k * p.y > 0.0)
|
||||
p.xy = float2(p.x - k * p.y, -k * p.x - p.y) / 2.0;
|
||||
p.x -= clamp(p.x, -2.0, 0.0);
|
||||
float d1 = length(p.xy) * sign(-p.y) * h.x;
|
||||
float d2 = abs(p.z) - h.y;
|
||||
return length(max(float2(d1, d2), 0.0)) + min(max(d1, d2), 0.);
|
||||
}
|
||||
|
||||
// vertical
|
||||
float sdCylinder(float3 p, float2 h)
|
||||
{
|
||||
float2 d = abs(float2(length(p.xz), p.y)) - h;
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
// arbitrary orientation
|
||||
float sdCylinder(float3 p, float3 a, float3 b, float r)
|
||||
{
|
||||
float3 pa = p - a;
|
||||
float3 ba = b - a;
|
||||
float baba = dot(ba, ba);
|
||||
float paba = dot(pa, ba);
|
||||
|
||||
float x = length(pa * baba - ba * paba) - r * baba;
|
||||
float y = abs(paba - baba * 0.5) - baba * 0.5;
|
||||
float x2 = x * x;
|
||||
float y2 = y * y * baba;
|
||||
float d = (max(x, y) < 0.0) ? -min(x2, y2) : (((x > 0.0) ? x2 : 0.0) + ((y > 0.0) ? y2 : 0.0));
|
||||
return sign(d) * sqrt(abs(d)) / baba;
|
||||
}
|
||||
|
||||
// vertical
|
||||
float sdCone(in float3 p, in float2 c, float h)
|
||||
{
|
||||
float2 q = h * float2(c.x, -c.y) / c.y;
|
||||
float2 w = float2(length(p.xz), p.y);
|
||||
|
||||
float2 a = w - q * clamp(dot(w, q) / dot(q, q), 0.0, 1.0);
|
||||
float2 b = w - q * float2(clamp(w.x / q.x, 0.0, 1.0), 1.0);
|
||||
float k = sign(q.y);
|
||||
float d = min(dot(a, a), dot(b, b));
|
||||
float s = max(k * (w.x * q.y - w.y * q.x), k * (w.y - q.y));
|
||||
return sqrt(d) * sign(s);
|
||||
}
|
||||
|
||||
float sdCone( in float3 p, in float3 c )
|
||||
{
|
||||
float2 q = float2( length(p.xy), p.z );
|
||||
float d1 = -q.x-c.z;
|
||||
float d2 = max( dot(q,c.xy), q.y);
|
||||
return length(max(float2(d1,d2),0.0)) + min(max(d1,d2), 0.);
|
||||
}
|
||||
|
||||
float sdCappedCone(in float3 p, in float h, in float r1, in float r2)
|
||||
{
|
||||
float2 q = float2(length(p.xz), p.y);
|
||||
|
||||
float2 k1 = float2(r2, h);
|
||||
float2 k2 = float2(r2 - r1, 2.0 * h);
|
||||
float2 ca = float2(q.x - min(q.x, (q.y < 0.0) ? r1 : r2), abs(q.y) - h);
|
||||
float2 cb = q - k1 + k2 * clamp(dot(k1 - q, k2) / dot2(k2), 0.0, 1.0);
|
||||
float s = (cb.x < 0.0 && ca.y < 0.0) ? -1.0 : 1.0;
|
||||
return s * sqrt(min(dot2(ca), dot2(cb)));
|
||||
}
|
||||
|
||||
float sdCappedCone(float3 p, float3 a, float3 b, float ra, float rb)
|
||||
{
|
||||
float rba = rb - ra;
|
||||
float baba = dot(b - a, b - a);
|
||||
float papa = dot(p - a, p - a);
|
||||
float paba = dot(p - a, b - a) / baba;
|
||||
|
||||
float x = sqrt(papa - paba * paba * baba);
|
||||
|
||||
float cax = max(0.0, x - ((paba < 0.5) ? ra : rb));
|
||||
float cay = abs(paba - 0.5) - 0.5;
|
||||
|
||||
float k = rba * rba + baba;
|
||||
float f = clamp((rba * (x - ra) + paba * baba) / k, 0.0, 1.0);
|
||||
|
||||
float cbx = x - ra - f * rba;
|
||||
float cby = paba - f;
|
||||
|
||||
float s = (cbx < 0.0 && cay < 0.0) ? -1.0 : 1.0;
|
||||
|
||||
return s * sqrt(min(cax * cax + cay * cay * baba,
|
||||
cbx * cbx + cby * cby * baba));
|
||||
}
|
||||
|
||||
// c is the sin/cos of the desired cone angle
|
||||
float sdSolidAngle(float3 pos, float2 c, float ra)
|
||||
{
|
||||
float2 p = float2(length(pos.xz), pos.y);
|
||||
float l = length(p) - ra;
|
||||
float m = length(p - c * clamp(dot(p, c), 0.0, ra));
|
||||
return max(l, m * sign(c.y * p.x - c.x * p.y));
|
||||
}
|
||||
|
||||
float sdPyramid(in float3 p, in float h)
|
||||
{
|
||||
float m2 = h * h + 0.25;
|
||||
|
||||
// symmetry
|
||||
p.xz = abs(p.xz);
|
||||
p.xz = (p.z > p.x) ? p.zx : p.xz;
|
||||
p.xz -= 0.5;
|
||||
|
||||
// project into face plane (2D)
|
||||
float3 q = float3(p.z, h * p.y - 0.5 * p.x, h * p.x + 0.5 * p.y);
|
||||
|
||||
float s = max(-q.x, 0.0);
|
||||
float t = clamp((q.y - 0.5 * p.z) / (m2 + 0.25), 0.0, 1.0);
|
||||
|
||||
float a = m2 * (q.x + s) * (q.x + s) + q.y * q.y;
|
||||
float b = m2 * (q.x + 0.5 * t) * (q.x + 0.5 * t) + (q.y - m2 * t) * (q.y - m2 * t);
|
||||
|
||||
float d2 = min(q.y, -q.x * m2 - q.y * 0.5) > 0.0 ? 0.0 : min(a, b);
|
||||
|
||||
// recover 3D and scale, and add sign
|
||||
return sqrt((d2 + q.z * q.z) / m2) * sign(max(q.z, -p.y));;
|
||||
}
|
||||
|
||||
// la,lb=semi axis, h=height, ra=corner
|
||||
float sdRhombus(float3 p, float la, float lb, float h, float ra)
|
||||
{
|
||||
p = abs(p);
|
||||
float2 b = float2(la, lb);
|
||||
float f = clamp((ndot(b, b - 2.0 * p.xz)) / dot(b, b), -1.0, 1.0);
|
||||
float2 q = float2(length(p.xz - 0.5 * b * float2(1.0 - f, 1.0 + f)) * sign(p.x * b.y + p.z * b.x - b.x * b.y) - ra, p.y - h);
|
||||
return min(max(q.x, q.y), 0.0) + length(max(q, 0.0));
|
||||
}
|
||||
|
||||
float sdHorseshoe(in float3 p, in float2 c, in float r, in float le, float2 w)
|
||||
{
|
||||
p.x = abs(p.x);
|
||||
float l = length(p.xy);
|
||||
p.xy = mul(p.xy, float2x2(-c.x, c.y, c.y, c.x));
|
||||
p.xy = float2((p.y > 0.0 || p.x > 0.0) ? p.x : l * sign(-c.x),
|
||||
(p.x > 0.0) ? p.y : l);
|
||||
p.xy = float2(p.x, abs(p.y - r)) - float2(le, 0.0);
|
||||
|
||||
float2 q = float2(length(max(p.xy, 0.0)) + min(0.0, max(p.x, p.y)), p.z);
|
||||
float2 d = abs(q) - w;
|
||||
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0));
|
||||
}
|
||||
|
||||
float sdU(in float3 p, in float r, in float le, float2 w)
|
||||
{
|
||||
p.x = (p.y > 0.0) ? abs(p.x) : length(p.xy);
|
||||
p.x = abs(p.x - r);
|
||||
p.y = p.y - le;
|
||||
float k = max(p.x, p.y);
|
||||
float2 q = float2((k < 0.0) ? -k : length(max(p.xy, 0.0)), abs(p.z)) - w;
|
||||
return length(max(q, 0.0)) + min(max(q.x, q.y), 0.0);
|
||||
}
|
||||
|
||||
float2 opU(float2 d1, float2 d2)
|
||||
{
|
||||
return (d1.x < d2.x) ? d1 : d2;
|
||||
}
|
||||
|
||||
void pR(inout float2 p, float a) {
|
||||
p = cos(a)*p + sin(a)*float2(p.y, -p.x);
|
||||
}
|
||||
|
||||
float4 qmul(float4 q1, float4 q2)
|
||||
{
|
||||
return float4(
|
||||
q2.xyz * q1.w + q1.xyz * q2.w + cross(q1.xyz, q2.xyz),
|
||||
q1.w * q2.w - dot(q1.xyz, q2.xyz)
|
||||
);
|
||||
}
|
||||
|
||||
void pR(inout float3 v, float4 r)
|
||||
{
|
||||
v = qmul(r, qmul(float4(v, 0), r * float4(-1, -1, -1, 1))).xyz;
|
||||
}
|
||||
|
||||
// A given angle of rotation about a given axis
|
||||
float4 quaternion(float3 axis, float angle)
|
||||
{
|
||||
float2 sc;
|
||||
sincos(angle, sc.x, sc.y);
|
||||
return float4(normalize(axis) * sc.x, sc.y);
|
||||
}
|
||||
29
netpoet-coop-8k/src/intro/shaders/taa.hlsl
Normal file
29
netpoet-coop-8k/src/intro/shaders/taa.hlsl
Normal file
@@ -0,0 +1,29 @@
|
||||
void taa(inout float3 old, in float2 id, int2 iResolution)
|
||||
{
|
||||
id *= iResolution;
|
||||
id += .5;
|
||||
if (any(id <= 1) || any(id >= iResolution - 1))
|
||||
return;
|
||||
|
||||
// get the neighborhood min / max from this frame's render
|
||||
float3 center = lastFrame[id].rgb;
|
||||
float3 minColor = center;
|
||||
float3 maxColor = center;
|
||||
for (int iy = -1; iy <= 1; ++iy)
|
||||
{
|
||||
for (int ix = -1; ix <= 1; ++ix)
|
||||
{
|
||||
if (ix == 0 && iy == 0)
|
||||
continue;
|
||||
|
||||
float3 color = lastFrame[id + int2(ix, iy)].rgb;
|
||||
minColor = min(minColor, color);
|
||||
maxColor = max(maxColor, color);
|
||||
}
|
||||
}
|
||||
|
||||
//center = max(minColor, center);
|
||||
//center = min(maxColor, center);
|
||||
// get last frame's pixel and clamp it to the neighborhood of this frame
|
||||
old = lerp(old, center, 0.4);
|
||||
}
|
||||
6
netpoet-coop-8k/src/shc/App.config
Normal file
6
netpoet-coop-8k/src/shc/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
616
netpoet-coop-8k/src/shc/Program.cs
Normal file
616
netpoet-coop-8k/src/shc/Program.cs
Normal file
@@ -0,0 +1,616 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace shc
|
||||
{
|
||||
class Program
|
||||
{
|
||||
struct EntryPoint
|
||||
{
|
||||
public string TypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Prefix { get; set; }
|
||||
public string[] Parameters { get; set; }
|
||||
}
|
||||
|
||||
struct ShaderInfo
|
||||
{
|
||||
public ShaderInfo(string pointerType, string prefix, string createFunction)
|
||||
: this()
|
||||
{
|
||||
PointerType = pointerType;
|
||||
Prefix = prefix;
|
||||
CreateFunction = createFunction;
|
||||
}
|
||||
|
||||
public string PointerType { get; set; }
|
||||
public string Prefix { get; set; }
|
||||
public string CreateFunction { get; set; }
|
||||
}
|
||||
|
||||
static int Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("shc " + string.Join(" ", args.Select(arg => "\"" + arg + "\"")));
|
||||
|
||||
if (args.Length != 5)
|
||||
{
|
||||
Console.WriteLine("Usage: shc $(HlslInputPath) $(MinifiedHeaderPath) $(ShaderHeaderPath) $(MergedHlslOutputPath) $(SyncMetaPath)");
|
||||
return -1;
|
||||
}
|
||||
|
||||
var path = Path.GetFullPath(args[0]);
|
||||
if (!File.Exists(args[0]))
|
||||
{
|
||||
Console.WriteLine("ERROR: " + args[0] + " does not exist!");
|
||||
return -2;
|
||||
}
|
||||
|
||||
var resultLines = new List<Tuple<string, string>>();
|
||||
var entryPoints = new List<EntryPoint>();
|
||||
string mergedPath = args[3];
|
||||
string metaPath = args[4];
|
||||
string mergedMetaPath = mergedPath + ".meta";
|
||||
try
|
||||
{
|
||||
GetCombinedLinesFromIncludes(path, resultLines, entryPoints);
|
||||
resultLines.Add(Tuple.Create(string.Empty, string.Empty));
|
||||
File.WriteAllText(mergedPath, string.Join("\n", resultLines.Select(l => l.Item1)));
|
||||
File.WriteAllText(mergedMetaPath, string.Join("\n", resultLines.Select(l => l.Item2)));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("ERROR: While loading " + path + ": " + e.Message);
|
||||
return -3;
|
||||
}
|
||||
|
||||
var outputPath = Path.GetFullPath(args[1]);
|
||||
if (File.Exists(outputPath))
|
||||
{
|
||||
File.Delete(outputPath);
|
||||
}
|
||||
var outputDir = Path.GetDirectoryName(outputPath);
|
||||
if (!Directory.Exists(outputDir))
|
||||
{
|
||||
Directory.CreateDirectory(outputDir);
|
||||
}
|
||||
|
||||
var toolsLocation = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), "..\\tools");
|
||||
try
|
||||
{
|
||||
string arguments = "--hlsl -v -o " + outputPath + " ";
|
||||
if (entryPoints.Count > 0)
|
||||
{
|
||||
//arguments += "--no-renaming-list " + string.Join(",", entryPoints.Select(kvp => kvp.Name)) + " ";
|
||||
arguments += "--no-renaming --no-sequence ";
|
||||
}
|
||||
arguments += mergedPath;
|
||||
|
||||
Process myProcess = new Process();
|
||||
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo(Path.Combine(toolsLocation, "shader_minifier.exe"), arguments);
|
||||
myProcessStartInfo.UseShellExecute = false;
|
||||
myProcessStartInfo.RedirectStandardOutput = true;
|
||||
myProcess.StartInfo = myProcessStartInfo;
|
||||
myProcess.Start();
|
||||
StreamReader myStreamReader = myProcess.StandardOutput;
|
||||
var output = myStreamReader.ReadToEnd();
|
||||
Console.WriteLine(output);
|
||||
myProcess.WaitForExit();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("ERROR: While running shader minifier: " + e.Message);
|
||||
return -4;
|
||||
}
|
||||
|
||||
if (!File.Exists(outputPath))
|
||||
{
|
||||
return -5;
|
||||
}
|
||||
|
||||
var outputLines = File.ReadAllLines(outputPath).ToArray();
|
||||
int iNumThreadCount = 0;
|
||||
for (int i = 0; i < outputLines.Length; ++i)
|
||||
{
|
||||
if (outputLines[i].Trim() == "\"[numthreads(16,16,1)]\"")
|
||||
{
|
||||
++iNumThreadCount;
|
||||
}
|
||||
}
|
||||
if (iNumThreadCount > 1)
|
||||
{
|
||||
for (int i = 0; i < outputLines.Length; ++i)
|
||||
{
|
||||
if (outputLines[i].Trim() == "char merged_hlsl[] =")
|
||||
{
|
||||
outputLines[i] = "char merged_hlsl[] = \"#define _ [numthreads(16,16,1)]\\n\"";
|
||||
}
|
||||
else if (outputLines[i].Trim() == "\"[numthreads(16,16,1)]\"")
|
||||
{
|
||||
outputLines[i] = " \"_ \"";
|
||||
}
|
||||
}
|
||||
}
|
||||
File.WriteAllLines(outputPath, outputLines);
|
||||
|
||||
try
|
||||
{
|
||||
var headerPath = Path.GetFullPath(args[2]);
|
||||
using (var stream = new FileStream(headerPath, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
using (var writer = new StreamWriter(stream))
|
||||
{
|
||||
if (entryPoints.Count > 0)
|
||||
{
|
||||
writer.WriteLine("#pragma once");
|
||||
writer.WriteLine("// WARNING: This file is autogenerated by shc. Do not edit");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\".cs_5_0\")");
|
||||
writer.WriteLine("static char cs_5_0[] = \"cs_5_0\";");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\".vs_5_0\")");
|
||||
writer.WriteLine("static char vs_5_0[] = \"vs_5_0\";");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\".gs_5_0\")");
|
||||
writer.WriteLine("static char gs_5_0[] = \"gs_5_0\";");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\".ds_5_0\")");
|
||||
writer.WriteLine("static char ds_5_0[] = \"ds_5_0\";");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\".hs_5_0\")");
|
||||
writer.WriteLine("static char hs_5_0[] = \"hs_5_0\";");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\".ps_5_0\")");
|
||||
writer.WriteLine("static char ps_5_0[] = \"ps_5_0\";");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma bss_seg(\".shaderbss\")");
|
||||
foreach (var entryPoint in entryPoints)
|
||||
{
|
||||
if (entryPoint.TypeName == "hc")
|
||||
continue;
|
||||
|
||||
foreach (var shaderInfo in GetShaderInfo(entryPoint.TypeName))
|
||||
{
|
||||
writer.WriteLine("static " + shaderInfo.PointerType + "* " + shaderInfo.Prefix + entryPoint.Name + ";");
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var entryPoint in entryPoints)
|
||||
{
|
||||
if (entryPoint.TypeName == "hc")
|
||||
continue;
|
||||
|
||||
if (entryPoint.TypeName == "gs_so" || entryPoint.TypeName == "vs_gs_so")
|
||||
{
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\"." + entryPoint.Name + "SODeclarations\")");
|
||||
writer.WriteLine("extern D3D11_SO_DECLARATION_ENTRY " + entryPoint.Name + "SODeclarations[" + entryPoint.Parameters[0] + "];");
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\"." + entryPoint.Name + "Strides\")");
|
||||
writer.WriteLine("extern UINT " + entryPoint.Name + "Strides[" + entryPoint.Parameters[1] + "];");
|
||||
}
|
||||
|
||||
if (entryPoint.TypeName == "vs_il")
|
||||
{
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma data_seg(\"." + entryPoint.Name + "InputLayoutDesc\")");
|
||||
writer.WriteLine("extern D3D11_INPUT_ELEMENT_DESC " + entryPoint.Name + "InputLayoutDesc[" + entryPoint.Parameters[0] + "];");
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#pragma code_seg(\".FrameworkShadersCompile\")");
|
||||
writer.WriteLine("INLINE void FrameworkShadersCompile()");
|
||||
writer.WriteLine("{");
|
||||
foreach (var entryPoint in entryPoints)
|
||||
{
|
||||
if (entryPoint.TypeName == "hc")
|
||||
continue;
|
||||
|
||||
writer.WriteLine("\tCompileShader(\"" + entryPoint.Name + "\", " + entryPoint.Prefix + "_5_0);");
|
||||
foreach (var shaderInfo in GetShaderInfo(entryPoint.TypeName))
|
||||
{
|
||||
if (shaderInfo.CreateFunction == "CreateGeometryShaderWithStreamOutput")
|
||||
{
|
||||
var parameters = string.Join(", ", entryPoint.Parameters);
|
||||
writer.WriteLine("\tdevice->CreateGeometryShaderWithStreamOutput(shaderCode, shaderSize, " + entryPoint.Name + "SODeclarations, " + entryPoint.Parameters[0] + ", " + entryPoint.Name + "Strides, " + entryPoint.Parameters[1] + ", D3D11_SO_NO_RASTERIZED_STREAM, NULL, &" + shaderInfo.Prefix + entryPoint.Name + ");");
|
||||
}
|
||||
else if (shaderInfo.CreateFunction == "CreateInputLayout")
|
||||
{
|
||||
var parameters = string.Join(", ", entryPoint.Parameters);
|
||||
writer.WriteLine("\tdevice->CreateInputLayout(" + entryPoint.Name + "InputLayoutDesc, " + entryPoint.Parameters[0] + ", shaderCode, shaderSize, &" + shaderInfo.Prefix + entryPoint.Name + ");");
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteLine("\tdevice->" + shaderInfo.CreateFunction + "(shaderCode, shaderSize, NULL, &" + shaderInfo.Prefix + entryPoint.Name + ");");
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine();
|
||||
}
|
||||
|
||||
if (s_dSyncStructLines.Count > 0)
|
||||
{
|
||||
writer.WriteLine("#ifndef AUTHORING");
|
||||
writer.WriteLine("#include \"syncdata.g.h\"");
|
||||
writer.WriteLine("#endif");
|
||||
|
||||
int iSize = 0;
|
||||
var syncVariables = new List<string>();
|
||||
foreach (var syncType in s_dSyncStructLines.OrderBy(k => k.Key == "audio" ? "" : k.Key))
|
||||
{
|
||||
List<Tuple<int, string>> lSyncVariables = new List<Tuple<int, string>>();
|
||||
var sSyncType = syncType.Key;
|
||||
foreach (var line in syncType.Value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(line))
|
||||
continue;
|
||||
|
||||
var tokens = line.Split(' ', '\t', ';').Select(t => t.Trim()).Where(t => !string.IsNullOrEmpty(t)).ToList();
|
||||
if (tokens.Count == 0)
|
||||
continue;
|
||||
|
||||
if (tokens[0] == "struct")
|
||||
{
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("struct SyncStruct_" + sSyncType);
|
||||
continue;
|
||||
}
|
||||
|
||||
int typeIndex = Math.Max(Math.Max(Math.Max(Math.Max(Math.Max(Math.Max(tokens.IndexOf("float"), tokens.IndexOf("float2")), tokens.IndexOf("float3")), tokens.IndexOf("float4")), tokens.IndexOf("float4x4")), tokens.IndexOf("int")), tokens.IndexOf("uint"));
|
||||
if (typeIndex != -1)
|
||||
{
|
||||
switch (tokens[typeIndex])
|
||||
{
|
||||
case "float":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(1, tokens[typeIndex + 1]));
|
||||
iSize += 4;
|
||||
break;
|
||||
}
|
||||
case "float2":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(2, tokens[typeIndex + 1]));
|
||||
iSize += 8;
|
||||
break;
|
||||
}
|
||||
case "float3":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(3, tokens[typeIndex + 1]));
|
||||
iSize += 12;
|
||||
break;
|
||||
}
|
||||
case "float4":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(4, tokens[typeIndex + 1]));
|
||||
iSize += 16;
|
||||
break;
|
||||
}
|
||||
case "float4x4":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(5, tokens[typeIndex + 1]));
|
||||
iSize += 64;
|
||||
break;
|
||||
}
|
||||
case "int":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(6, tokens[typeIndex + 1]));
|
||||
iSize += 4;
|
||||
break;
|
||||
}
|
||||
case "uint":
|
||||
{
|
||||
lSyncVariables.Add(new Tuple<int, string>(7, tokens[typeIndex + 1]));
|
||||
iSize += 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (line.Trim()[0] == '}')
|
||||
{
|
||||
if (iSize % 16 != 0)
|
||||
iSize += 16 - (iSize % 16);
|
||||
|
||||
foreach (var syncVar in lSyncVariables)
|
||||
{
|
||||
switch (syncVar.Item1)
|
||||
{
|
||||
case 1:
|
||||
syncVariables.Add(syncVar.Item2);
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + ";");
|
||||
iSize -= 4;
|
||||
break;
|
||||
case 2:
|
||||
syncVariables.Add(syncVar.Item2 + "_x");
|
||||
syncVariables.Add(syncVar.Item2 + "_y");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_x;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_y;");
|
||||
iSize -= 8;
|
||||
break;
|
||||
case 3:
|
||||
syncVariables.Add(syncVar.Item2 + "_x");
|
||||
syncVariables.Add(syncVar.Item2 + "_y");
|
||||
syncVariables.Add(syncVar.Item2 + "_z");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_x;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_y;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_z;");
|
||||
iSize -= 12;
|
||||
break;
|
||||
case 4:
|
||||
syncVariables.Add(syncVar.Item2 + "_x");
|
||||
syncVariables.Add(syncVar.Item2 + "_y");
|
||||
syncVariables.Add(syncVar.Item2 + "_z");
|
||||
syncVariables.Add(syncVar.Item2 + "_w");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_x;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_y;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_z;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_w;");
|
||||
iSize -= 16;
|
||||
break;
|
||||
case 5:
|
||||
syncVariables.Add(syncVar.Item2 + "_xx");
|
||||
syncVariables.Add(syncVar.Item2 + "_xy");
|
||||
syncVariables.Add(syncVar.Item2 + "_xz");
|
||||
syncVariables.Add(syncVar.Item2 + "_xw");
|
||||
syncVariables.Add(syncVar.Item2 + "_yx");
|
||||
syncVariables.Add(syncVar.Item2 + "_yy");
|
||||
syncVariables.Add(syncVar.Item2 + "_yz");
|
||||
syncVariables.Add(syncVar.Item2 + "_yw");
|
||||
syncVariables.Add(syncVar.Item2 + "_zx");
|
||||
syncVariables.Add(syncVar.Item2 + "_zy");
|
||||
syncVariables.Add(syncVar.Item2 + "_zz");
|
||||
syncVariables.Add(syncVar.Item2 + "_zw");
|
||||
syncVariables.Add(syncVar.Item2 + "_wx");
|
||||
syncVariables.Add(syncVar.Item2 + "_wy");
|
||||
syncVariables.Add(syncVar.Item2 + "_wz");
|
||||
syncVariables.Add(syncVar.Item2 + "_ww");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_xx;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_xy;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_xz;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_xw;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_yx;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_yy;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_yz;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_yw;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_zx;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_zy;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_zz;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_zw;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_wx;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_wy;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_wz;");
|
||||
writer.WriteLine("\tfloat " + syncVar.Item2 + "_ww;");
|
||||
iSize -= 64;
|
||||
break;
|
||||
case 6:
|
||||
syncVariables.Add(syncVar.Item2);
|
||||
writer.WriteLine("\tint " + syncVar.Item2 + ";");
|
||||
iSize -= 4;
|
||||
break;
|
||||
case 7:
|
||||
syncVariables.Add(syncVar.Item2);
|
||||
writer.WriteLine("\tunsigned int " + syncVar.Item2 + ";");
|
||||
iSize -= 4;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int iDummyIndex = 1;
|
||||
|
||||
while (iSize > 0)
|
||||
{
|
||||
writer.WriteLine("\tfloat dummy_" + iDummyIndex++ + ";");
|
||||
iSize -= 4;
|
||||
}
|
||||
writer.WriteLine(line);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteLine(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File.WriteAllText(metaPath, string.Join("\n", syncVariables));
|
||||
writer.WriteLine();
|
||||
writer.WriteLine("#define SYNC");
|
||||
writer.WriteLine("#include \"../sync.h\"");
|
||||
writer.WriteLine();
|
||||
}
|
||||
|
||||
writer.Flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("ERROR: While generating shc output: " + e.Message);
|
||||
return -6;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static IEnumerable<ShaderInfo> GetShaderInfo(string p)
|
||||
{
|
||||
if (p == "cs")
|
||||
yield return new ShaderInfo("ID3D11ComputeShader", "", "CreateComputeShader");
|
||||
else if (p == "vs")
|
||||
yield return new ShaderInfo("ID3D11VertexShader", "", "CreateVertexShader");
|
||||
else if (p == "vs_il")
|
||||
{
|
||||
yield return new ShaderInfo("ID3D11VertexShader", "vs_", "CreateVertexShader");
|
||||
yield return new ShaderInfo("ID3D11InputLayout", "il_", "CreateInputLayout");
|
||||
}
|
||||
else if (p == "ds")
|
||||
yield return new ShaderInfo("ID3D11DomainShader", "", "CreateDomainShader");
|
||||
else if (p == "hs")
|
||||
yield return new ShaderInfo("ID3D11HullShader", "", "CreateHullShader");
|
||||
else if (p == "gs")
|
||||
yield return new ShaderInfo("ID3D11GeometryShader", "", "CreateGeometryShader");
|
||||
else if (p == "ps")
|
||||
yield return new ShaderInfo("ID3D11PixelShader", "", "CreatePixelShader");
|
||||
else if (p == "gs_so")
|
||||
yield return new ShaderInfo("ID3D11GeometryShader", "", "CreateGeometryShaderWithStreamOutput");
|
||||
else if (p == "vs_gs_so")
|
||||
{
|
||||
yield return new ShaderInfo("ID3D11VertexShader", "vs_", "CreateVertexShader");
|
||||
yield return new ShaderInfo("ID3D11GeometryShader", "gs_", "CreateGeometryShaderWithStreamOutput");
|
||||
}
|
||||
}
|
||||
|
||||
private static void GetCombinedLinesFromIncludes(string path, List<Tuple<string, string>> resultLines, List<EntryPoint> entryPoints)
|
||||
{
|
||||
var loadedPaths = new List<string>();
|
||||
AggregateLines(path, resultLines, entryPoints, loadedPaths);
|
||||
}
|
||||
|
||||
private static void AggregateLines(string path, List<Tuple<string, string>> resultLines, List<EntryPoint> entryPoints, List<string> loadedPaths)
|
||||
{
|
||||
if (loadedPaths.Contains(path))
|
||||
return;
|
||||
|
||||
loadedPaths.Add(path);
|
||||
var basePath = Path.GetDirectoryName(path);
|
||||
var lines = File.ReadAllLines(path);
|
||||
string sEntryPointType = null;
|
||||
string[] entryPointParameters = null;
|
||||
int lineNumber = 1;
|
||||
var enumerator = lines.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
var line = (string)enumerator.Current;
|
||||
if (line.StartsWith("#include"))
|
||||
{
|
||||
var includeFile = line.Substring(8).Trim().Split('"')[1];
|
||||
var includePath = Path.GetFullPath(Path.Combine(basePath, includeFile));
|
||||
AggregateLines(includePath, resultLines, entryPoints, loadedPaths);
|
||||
}
|
||||
else if (line.Trim().StartsWith("//[entrypoint"))
|
||||
{
|
||||
sEntryPointType = line.Trim().Substring(13).Trim();
|
||||
if (sEntryPointType.StartsWith("("))
|
||||
{
|
||||
entryPointParameters = sEntryPointType.Substring(1, sEntryPointType.Length - 2).Trim().Split(',', ')').Skip(1).ToArray();
|
||||
entryPointParameters = entryPointParameters.Take(entryPointParameters.Length - 1).Select(p => p.Trim()).ToArray();
|
||||
sEntryPointType = sEntryPointType.Substring(1).Split(',', ')')[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
sEntryPointType = "unknown";
|
||||
}
|
||||
|
||||
if (sEntryPointType == "vs_gs_so" || sEntryPointType == "gs_so")
|
||||
{
|
||||
if (entryPointParameters.Length != 2)
|
||||
{
|
||||
throw new Exception("An entry point of type " + sEntryPointType + " needs 2 parameters: (StreamOutputDeclaration count, Stride count)");
|
||||
}
|
||||
}
|
||||
else if (sEntryPointType == "vs_il")
|
||||
{
|
||||
if (entryPointParameters.Length != 1)
|
||||
{
|
||||
throw new Exception("An entry point of type " + sEntryPointType + " needs 1 parameter: (InputElementDesc count)");
|
||||
}
|
||||
}
|
||||
else if (entryPointParameters != null && entryPointParameters.Length != 0)
|
||||
{
|
||||
throw new Exception("An entry point of type " + sEntryPointType + " needs no parameters");
|
||||
}
|
||||
|
||||
resultLines.Add(Tuple.Create(string.Empty, $"{path}|{lineNumber}"));
|
||||
}
|
||||
else if (line.Trim().StartsWith("[patchconstantfunc"))
|
||||
{
|
||||
var sEntryPointName = line.Trim().Substring(18).Trim();
|
||||
if (sEntryPointName.StartsWith("("))
|
||||
{
|
||||
sEntryPointName = sEntryPointName.Substring(2).Split('\"', ')')[0];
|
||||
}
|
||||
entryPoints.Add(new EntryPoint() { TypeName = "hc", Name = sEntryPointName });
|
||||
resultLines.Add(Tuple.Create(line, $"{path}|{lineNumber}"));
|
||||
}
|
||||
else if (line.Trim().StartsWith("//[syncstruct"))
|
||||
{
|
||||
var sSyncType = line.Trim().Substring(13).Trim();
|
||||
if (sSyncType.StartsWith("("))
|
||||
{
|
||||
sSyncType = sSyncType.Substring(1, sSyncType.Length - 3).Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("//[syncstruct(type)] missing type argument. Specify audio.");
|
||||
}
|
||||
if (sSyncType != "audio")
|
||||
{
|
||||
throw new Exception("//[syncstruct(type)] invalid type argument. Specify audio.");
|
||||
}
|
||||
|
||||
int iBracketCount = 0;
|
||||
bool bStructStarted = false;
|
||||
bool bStructFound = false;
|
||||
var list = s_dSyncStructLines[sSyncType] = new List<string>();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
line = (string)enumerator.Current;
|
||||
if (line.Contains('{'))
|
||||
{
|
||||
++iBracketCount;
|
||||
bStructStarted = true;
|
||||
}
|
||||
if (line.Contains('}'))
|
||||
{
|
||||
--iBracketCount;
|
||||
}
|
||||
|
||||
resultLines.Add(Tuple.Create(line, $"{path}|{lineNumber}"));
|
||||
list.Add(line);
|
||||
++lineNumber;
|
||||
|
||||
if (bStructStarted && iBracketCount == 0)
|
||||
{
|
||||
bStructFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bStructFound)
|
||||
{
|
||||
throw new Exception("[syncstruct(type)] may only be used before a struct");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sEntryPointType != null)
|
||||
{
|
||||
var tempLine = line.Trim();
|
||||
while (tempLine.StartsWith("["))
|
||||
{
|
||||
var idx = tempLine.IndexOf("]");
|
||||
tempLine = tempLine.Substring(idx + 1).Trim();
|
||||
}
|
||||
var functionName = tempLine.Split(' ')[1].Split('(')[0];
|
||||
entryPoints.Add(new EntryPoint() { TypeName = sEntryPointType.ToLower(), Name = functionName, Prefix = sEntryPointType.ToLower().Substring(0, 2), Parameters = entryPointParameters });
|
||||
sEntryPointType = null;
|
||||
}
|
||||
|
||||
var resultLine = line;
|
||||
var commentIndex = line.IndexOf("//");
|
||||
if (commentIndex != -1)
|
||||
resultLine = resultLine.Substring(0, commentIndex);
|
||||
|
||||
resultLines.Add(Tuple.Create(resultLine, $"{path}|{lineNumber}"));
|
||||
}
|
||||
|
||||
++lineNumber;
|
||||
}
|
||||
}
|
||||
|
||||
private static Dictionary<string, List<string>> s_dSyncStructLines = new Dictionary<string, List<string>>();
|
||||
}
|
||||
}
|
||||
36
netpoet-coop-8k/src/shc/Properties/AssemblyInfo.cs
Normal file
36
netpoet-coop-8k/src/shc/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("shc")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("shc")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8e619b64-e97a-4b10-8e79-96582ebfe084")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
51
netpoet-coop-8k/src/shc/shc.csproj
Normal file
51
netpoet-coop-8k/src/shc/shc.csproj
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{930621BA-75BE-49FE-80DE-E75E7DC06931}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>shc</RootNamespace>
|
||||
<AssemblyName>shc</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
7
netpoet-coop-8k/src/shc/shc.csproj.user
Normal file
7
netpoet-coop-8k/src/shc/shc.csproj.user
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<StartArguments>shaders\intro.hlsl framework\codegen\intro_hlsl.g.h framework\codegen\shaders_shc.g.h framework\codegen\merged.hlsl framework\codegen\syncvars.meta</StartArguments>
|
||||
<StartWorkingDirectory>E:\alcatraz\revision2021-particle-8k\src\intro</StartWorkingDirectory>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
61
netpoet-coop-8k/src/tool/Actions/SyncEditAction.cs
Normal file
61
netpoet-coop-8k/src/tool/Actions/SyncEditAction.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using tool.ViewModels;
|
||||
|
||||
namespace tool.Actions
|
||||
{
|
||||
public class SyncEditAction : IUndoItem
|
||||
{
|
||||
public SyncEditAction(IUndoContext _context)
|
||||
{
|
||||
Context = _context;
|
||||
m_OldDataStream = new MemoryStream();
|
||||
m_OldDataWriter = new StreamWriter(m_OldDataStream);
|
||||
m_OldDataReader = new StreamReader(m_OldDataStream);
|
||||
((SyncViewModel)Context).Save(m_OldDataWriter);
|
||||
}
|
||||
|
||||
public bool CanRedo { get { return true; } }
|
||||
|
||||
public bool CanUndo { get { return true; } }
|
||||
|
||||
public IUndoContext Context
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public string Description { get { return "Edit cell value"; } }
|
||||
|
||||
public void Redo()
|
||||
{
|
||||
if (m_NewDataStream == null)
|
||||
{
|
||||
m_NewDataStream = new MemoryStream();
|
||||
m_NewDataWriter = new StreamWriter(m_OldDataStream);
|
||||
m_NewDataReader = new StreamReader(m_OldDataStream);
|
||||
((SyncViewModel)Context).Save(m_NewDataWriter);
|
||||
}
|
||||
else
|
||||
{
|
||||
((SyncViewModel)Context).Load(m_NewDataReader);
|
||||
}
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
{
|
||||
((SyncViewModel)Context).Load(m_OldDataReader);
|
||||
}
|
||||
|
||||
private MemoryStream m_OldDataStream;
|
||||
private MemoryStream m_NewDataStream;
|
||||
private StreamWriter m_OldDataWriter;
|
||||
private StreamWriter m_NewDataWriter;
|
||||
private StreamReader m_OldDataReader;
|
||||
private StreamReader m_NewDataReader;
|
||||
}
|
||||
}
|
||||
18
netpoet-coop-8k/src/tool/App.config
Normal file
18
netpoet-coop-8k/src/tool/App.config
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="tool.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<userSettings>
|
||||
<tool.Properties.Settings>
|
||||
<setting name="LastLayout" serializeAs="String">
|
||||
<value/>
|
||||
</setting>
|
||||
</tool.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
13
netpoet-coop-8k/src/tool/App.xaml
Normal file
13
netpoet-coop-8k/src/tool/App.xaml
Normal file
@@ -0,0 +1,13 @@
|
||||
<Application x:Class="tool.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/Themes/Shared/Controls.xaml" />
|
||||
<ResourceDictionary Source="/Themes/Dark/Theme.xaml" />
|
||||
<ResourceDictionary Source="/Layout/Views/Resources.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
117
netpoet-coop-8k/src/tool/App.xaml.cs
Normal file
117
netpoet-coop-8k/src/tool/App.xaml.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Navigation;
|
||||
using System.Xml.Serialization;
|
||||
using tool.Layout.Services;
|
||||
using tool.Layout.ViewModels;
|
||||
using tool.Properties;
|
||||
using tool.ViewModels;
|
||||
|
||||
namespace tool
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
#if VOID
|
||||
Shutdown();
|
||||
return;
|
||||
#endif
|
||||
this.Startup += App_Startup;
|
||||
}
|
||||
|
||||
private void App_Startup(object sender, StartupEventArgs e)
|
||||
{
|
||||
LayoutViewRegistry.RegisterAssembly(Assembly.GetExecutingAssembly());
|
||||
|
||||
Layouts = new ObservableCollection<LayoutViewModel>();
|
||||
|
||||
var serializer = new XmlSerializer(typeof(LayoutViewModel));
|
||||
if (Settings.Default.Layouts != null)
|
||||
{
|
||||
foreach (var layout in Settings.Default.Layouts)
|
||||
{
|
||||
Layouts.Add(serializer.Deserialize(new StringReader(layout)) as LayoutViewModel);
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Settings.Default.LastLayout))
|
||||
{
|
||||
var layoutVm = serializer.Deserialize(new StringReader(Settings.Default.LastLayout)) as LayoutViewModel;
|
||||
if (layoutVm.Windows.Count == 0)
|
||||
{
|
||||
WindowViewModel.CreateNewWindow();
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadLayout(layoutVm);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowViewModel.CreateNewWindow();
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadLayout(LayoutViewModel layoutViewModel)
|
||||
{
|
||||
RootViewModel.Instance.Windows.Replace(layoutViewModel.Windows, true);
|
||||
m_sCurrentLayout = layoutViewModel.DisplayName;
|
||||
}
|
||||
|
||||
public void SaveLayoutAs()
|
||||
{
|
||||
var layout = new LayoutViewModel();
|
||||
layout.DisplayName = MessageBoxService.Input("Enter the layout name:", m_sCurrentLayout);
|
||||
layout.Windows = RootViewModel.Instance.Windows.ToList();
|
||||
var existingLayout = Layouts.FirstOrDefault(l => l.DisplayName == layout.DisplayName);
|
||||
if (existingLayout != null)
|
||||
{
|
||||
Layouts.Remove(existingLayout);
|
||||
}
|
||||
Layouts.Add(layout);
|
||||
m_sCurrentLayout = layout.DisplayName;
|
||||
var serializer = new XmlSerializer(typeof(LayoutViewModel));
|
||||
var sb = new StringBuilder();
|
||||
serializer.Serialize(new StringWriter(sb), layout);
|
||||
if (Settings.Default.Layouts == null)
|
||||
{
|
||||
Settings.Default.Layouts = new System.Collections.Specialized.StringCollection();
|
||||
}
|
||||
Settings.Default.Layouts.Add(sb.ToString());
|
||||
Settings.Default.Save();
|
||||
}
|
||||
|
||||
public void SaveLastLayout()
|
||||
{
|
||||
var layout = new LayoutViewModel();
|
||||
layout.DisplayName = "Least recently used";
|
||||
layout.Windows = RootViewModel.Instance.Windows.ToList();
|
||||
var serializer = new XmlSerializer(typeof(LayoutViewModel));
|
||||
var sb = new StringBuilder();
|
||||
serializer.Serialize(new StringWriter(sb), layout);
|
||||
Settings.Default.LastLayout = sb.ToString();
|
||||
Settings.Default.Save();
|
||||
}
|
||||
|
||||
public ObservableCollection<LayoutViewModel> Layouts
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
private string m_sCurrentLayout;
|
||||
}
|
||||
}
|
||||
27
netpoet-coop-8k/src/tool/Dialogs/MessageBox.xaml
Normal file
27
netpoet-coop-8k/src/tool/Dialogs/MessageBox.xaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<Window x:Class="tool.Dialogs.MessageBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d" Title="LavaMold" SizeToContent="WidthAndHeight"
|
||||
d:DesignWidth="500" d:DesignHeight="200" MinWidth="400" WindowStartupLocation="CenterOwner">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image x:Name="ErrorIcon" Source="/tool;component/Images/bigerror.png" Grid.Row="1" Stretch="Uniform" Width="32" Height="32" Margin="5" VerticalAlignment="Top" />
|
||||
<Image x:Name="InfoIcon" Source="/tool;component/Images/biginfo.png" Grid.Row="1" Stretch="Uniform" Width="32" Height="32" Margin="5" VerticalAlignment="Top" />
|
||||
<TextBlock Grid.Column="1" x:Name="Message" Margin="5,10" FontWeight="Bold" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" x:Name="Details" TextWrapping="Wrap" IsReadOnly="True" Height="Auto" Margin="5" MaxWidth="800" MaxHeight="700" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" />
|
||||
<StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Right">
|
||||
<Button Content="Close" Margin="5,10" HorizontalAlignment="Right" Padding="5,3" Click="Button_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
32
netpoet-coop-8k/src/tool/Dialogs/MessageBox.xaml.cs
Normal file
32
netpoet-coop-8k/src/tool/Dialogs/MessageBox.xaml.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace tool.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MessageBox.xaml
|
||||
/// </summary>
|
||||
public partial class MessageBox : Window
|
||||
{
|
||||
public MessageBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
28
netpoet-coop-8k/src/tool/Dialogs/QueryChooseBox.xaml
Normal file
28
netpoet-coop-8k/src/tool/Dialogs/QueryChooseBox.xaml
Normal file
@@ -0,0 +1,28 @@
|
||||
<Window x:Class="tool.Dialogs.QueryChooseBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:tool.Dialogs"
|
||||
mc:Ignorable="d" SizeToContent="WidthAndHeight" Title="8kode"
|
||||
d:DesignHeight="300" d:DesignWidth="300" WindowStartupLocation="CenterOwner">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock x:Name="Message" Margin="5,10" FontWeight="Bold" TextWrapping="Wrap" Height="Auto" VerticalAlignment="Top" />
|
||||
<ItemsControl ItemsSource="{Binding Options, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:QueryChooseBox}}}" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="{Binding}" Margin="5,10" HorizontalAlignment="Right" Padding="5,3" Click="Button_Click" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
39
netpoet-coop-8k/src/tool/Dialogs/QueryChooseBox.xaml.cs
Normal file
39
netpoet-coop-8k/src/tool/Dialogs/QueryChooseBox.xaml.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace tool.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for QueryChooseBox.xaml
|
||||
/// </summary>
|
||||
public partial class QueryChooseBox : Window
|
||||
{
|
||||
public QueryChooseBox()
|
||||
{
|
||||
Result = null;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string Result { get; private set; }
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Result = (sender as Button).DataContext as string;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
public List<string> Options { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
22
netpoet-coop-8k/src/tool/Dialogs/UserInputBox.xaml
Normal file
22
netpoet-coop-8k/src/tool/Dialogs/UserInputBox.xaml
Normal file
@@ -0,0 +1,22 @@
|
||||
<Window x:Class="tool.Dialogs.UserInputBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d" SizeToContent="WidthAndHeight" Title="8kode"
|
||||
d:DesignWidth="500" d:DesignHeight="200" MaxWidth="500" WindowStartupLocation="CenterOwner">
|
||||
<Grid Margin="10,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock x:Name="Message" Margin="5" FontWeight="Bold" TextWrapping="Wrap" Height="Auto" VerticalAlignment="Top" />
|
||||
<TextBox Grid.Row="1" x:Name="UserInput" AcceptsReturn="False" MaxLines="1" Margin="5" Height="23" />
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right">
|
||||
<Button Content="OK" Margin="5" IsDefault="True" HorizontalAlignment="Right" Padding="5,3" Click="OkButton_Click" />
|
||||
<Button Content="Cancel" Margin="5" HorizontalAlignment="Right" Padding="5,3" Click="CancelButton_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
38
netpoet-coop-8k/src/tool/Dialogs/UserInputBox.xaml.cs
Normal file
38
netpoet-coop-8k/src/tool/Dialogs/UserInputBox.xaml.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace tool.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for UserInputBox.xaml
|
||||
/// </summary>
|
||||
public partial class UserInputBox : Window
|
||||
{
|
||||
public UserInputBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OkButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
UserInput.Text = null;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
19
netpoet-coop-8k/src/tool/Dialogs/YesNoBox.xaml
Normal file
19
netpoet-coop-8k/src/tool/Dialogs/YesNoBox.xaml
Normal file
@@ -0,0 +1,19 @@
|
||||
<Window x:Class="tool.Dialogs.YesNoBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d" SizeToContent="WidthAndHeight" Title="Alcatraz 8kode"
|
||||
d:DesignHeight="300" d:DesignWidth="300" WindowStartupLocation="CenterOwner">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock x:Name="Message" Margin="5,10" FontWeight="Bold" TextWrapping="Wrap" Height="Auto" VerticalAlignment="Top" />
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<Button Content="Yes" Margin="5,10" HorizontalAlignment="Right" Padding="5,3" Click="YesButton_Click" />
|
||||
<Button Content="No" Margin="5,10" HorizontalAlignment="Right" Padding="5,3" Click="NoButton_Click" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
41
netpoet-coop-8k/src/tool/Dialogs/YesNoBox.xaml.cs
Normal file
41
netpoet-coop-8k/src/tool/Dialogs/YesNoBox.xaml.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace tool.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for YesNoBox.xaml
|
||||
/// </summary>
|
||||
public partial class YesNoBox : Window
|
||||
{
|
||||
public YesNoBox()
|
||||
{
|
||||
Result = false;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public bool Result { get; private set; }
|
||||
|
||||
private void YesButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Result = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void NoButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
409
netpoet-coop-8k/src/tool/HLSL.xshd
Normal file
409
netpoet-coop-8k/src/tool/HLSL.xshd
Normal file
@@ -0,0 +1,409 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<SyntaxDefinition name = "HLSL" extensions = ".fx;.hlsl">
|
||||
|
||||
<Properties>
|
||||
<Property name="ToolTag" value="//["/>
|
||||
<Property name="LineComment" value="//"/>
|
||||
</Properties>
|
||||
|
||||
<Digits name = "Digits" bold = "false" italic = "false" color = "#FFC040"/>
|
||||
|
||||
<RuleSets>
|
||||
<RuleSet ignorecase = "false">
|
||||
<Delimiters>~!%^*()-+=|\#/{}[]:;"'<> , .?</Delimiters>
|
||||
|
||||
<Span name = "PreprocessorDirectives" bold="false" italic="false" color="#FF40C0" stopateol = "true">
|
||||
<Begin>#</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name = "ToolTag" color = "#80FFFF" stopateol = "true">
|
||||
<Begin>//[</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name = "LineComment" bold = "true" italic = "true" color = "#808080" stopateol = "true">
|
||||
<Begin>//</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name = "BlockComment" bold = "true" italic = "true" color = "#808080" stopateol = "false">
|
||||
<Begin>/*</Begin>
|
||||
<End>*/</End>
|
||||
</Span>
|
||||
|
||||
<Span name = "String" bold = "false" italic = "false" color = "#C0C040" stopateol = "true">
|
||||
<Begin>"</Begin>
|
||||
<End>"</End>
|
||||
</Span>
|
||||
|
||||
<Span name = "Char" bold = "false" italic = "false" color = "#C0C040" stopateol = "true">
|
||||
<Begin>'</Begin>
|
||||
<End>'</End>
|
||||
</Span>
|
||||
|
||||
<MarkPrevious bold = "false" italic = "false" color = "White">(</MarkPrevious>
|
||||
|
||||
<KeyWords name = "KEYWORD2" bold="false" italic="true" color="#26F9AD">
|
||||
<Key word = "and" />
|
||||
<Key word = "and_eq" />
|
||||
<Key word = "asm" />
|
||||
<Key word = "auto" />
|
||||
<Key word = "bitand" />
|
||||
<Key word = "bitor" />
|
||||
<Key word = "bool" />
|
||||
<Key word = "catch" />
|
||||
<Key word = "char" />
|
||||
<Key word = "class" />
|
||||
<Key word = "compl" />
|
||||
<Key word = "const" />
|
||||
<Key word = "const_cast" />
|
||||
<Key word = "delete" />
|
||||
<Key word = "double" />
|
||||
<Key word = "dynamic_cast" />
|
||||
<Key word = "enum" />
|
||||
<Key word = "explicit" />
|
||||
<Key word = "export" />
|
||||
<Key word = "extern" />
|
||||
<Key word = "false" />
|
||||
<Key word = "half" />
|
||||
<Key word = "half2" />
|
||||
<Key word = "half3" />
|
||||
<Key word = "half4" />
|
||||
<Key word = "half4x4" />
|
||||
<Key word = "half4x3" />
|
||||
<Key word = "half3x3" />
|
||||
<Key word = "float" />
|
||||
<Key word = "float2" />
|
||||
<Key word = "float3" />
|
||||
<Key word = "float4" />
|
||||
<Key word = "float4x4" />
|
||||
<Key word = "float4x3" />
|
||||
<Key word = "float3x3" />
|
||||
<Key word = "friend" />
|
||||
<Key word = "inline" />
|
||||
<Key word = "int" />
|
||||
<Key word = "int2" />
|
||||
<Key word = "int3" />
|
||||
<Key word = "int4" />
|
||||
<Key word = "int4x4" />
|
||||
<Key word = "int4x3" />
|
||||
<Key word = "int3x3" />
|
||||
<Key word = "long" />
|
||||
<Key word = "mutable" />
|
||||
<Key word = "namespace" />
|
||||
<Key word = "new" />
|
||||
<Key word = "not" />
|
||||
<Key word = "not_eq" />
|
||||
<Key word = "operator" />
|
||||
<Key word = "or" />
|
||||
<Key word = "or_eq" />
|
||||
<Key word = "private" />
|
||||
<Key word = "protected" />
|
||||
<Key word = "public" />
|
||||
<Key word = "register" />
|
||||
<Key word = "reinterpret_cast" />
|
||||
<Key word = "short" />
|
||||
<Key word = "signed" />
|
||||
<Key word = "sizeof" />
|
||||
<Key word = "static" />
|
||||
<Key word = "static_cast" />
|
||||
<Key word = "struct" />
|
||||
<Key word = "template" />
|
||||
<Key word = "this" />
|
||||
<Key word = "throw" />
|
||||
<Key word = "true" />
|
||||
<Key word = "try" />
|
||||
<Key word = "typedef" />
|
||||
<Key word = "typeid" />
|
||||
<Key word = "typename" />
|
||||
<Key word = "union" />
|
||||
<Key word = "unsigned" />
|
||||
<Key word = "using" />
|
||||
<Key word = "virtual" />
|
||||
<Key word = "void" />
|
||||
<Key word = "volatile" />
|
||||
<Key word = "xor" />
|
||||
<Key word = "xor_eq" />
|
||||
<Key word = "technique" />
|
||||
<Key word = "texture" />
|
||||
<Key word = "sampler2D" />
|
||||
<Key word = "using" />
|
||||
<Key word = "namespace" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Punctuation" bold = "false" italic = "false" color = "#80C080">
|
||||
<Key word = "?" />
|
||||
<Key word = "," />
|
||||
<Key word = "." />
|
||||
<Key word = ";" />
|
||||
<Key word = "(" />
|
||||
<Key word = ")" />
|
||||
<Key word = "[" />
|
||||
<Key word = "]" />
|
||||
<Key word = "{" />
|
||||
<Key word = "}" />
|
||||
<Key word = "+" />
|
||||
<Key word = "-" />
|
||||
<Key word = "/" />
|
||||
<Key word = "%" />
|
||||
<Key word = "*" />
|
||||
<Key word = "<" />
|
||||
<Key word = ">" />
|
||||
<Key word = "^" />
|
||||
<Key word = "=" />
|
||||
<Key word = "~" />
|
||||
<Key word = "!" />
|
||||
<Key word = "|" />
|
||||
<Key word = "&" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "OperatorKeywords" bold="false" italic="true" color="#80C080">
|
||||
<Key word = "and" />
|
||||
<Key word = "and_eq" />
|
||||
|
||||
<Key word = "bitand" />
|
||||
<Key word = "bitor" />
|
||||
|
||||
<Key word = "new" />
|
||||
<Key word = "not" />
|
||||
<Key word = "not_eq" />
|
||||
<Key word = "or" />
|
||||
<Key word = "or_eq" />
|
||||
<Key word = "xor" />
|
||||
<Key word = "xor_eq" />
|
||||
<Key word = "string" />
|
||||
<Key word = "pass" />
|
||||
<Key word = "PixelShader" />
|
||||
<Key word = "VertexShader" />
|
||||
<Key word = "compile" />
|
||||
</KeyWords>
|
||||
|
||||
|
||||
<KeyWords name = "AccessModifiers" bold="false" italic="false" color="#4040C0">
|
||||
<Key word = "private" />
|
||||
<Key word = "protected" />
|
||||
<Key word = "public" />
|
||||
<Key word = "uniform" />
|
||||
<Key word = "const" />
|
||||
<Key word = "volatile" />
|
||||
|
||||
<Key word = "static" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Types" bold="false" italic="true" color="#26F9AD">
|
||||
<Key word = "bool" />
|
||||
<Key word = "char" />
|
||||
<Key word = "unsigned" />
|
||||
<Key word = "union" />
|
||||
<Key word = "virtual" />
|
||||
<Key word = "double" />
|
||||
<Key word = "float" />
|
||||
<Key word = "short" />
|
||||
<Key word = "signed" />
|
||||
<Key word = "void" />
|
||||
<Key word = "class" />
|
||||
|
||||
<Key word = "enum" />
|
||||
<Key word = "struct" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "IntrinsicFunctions" bold="false" italic="false" color="#C080A0">
|
||||
|
||||
<Key word = "abort" />
|
||||
<Key word = "abs" />
|
||||
<Key word = "acos" />
|
||||
<Key word = "all" />
|
||||
<Key word = "AllMemoryBarrier" />
|
||||
<Key word = "AllMemoryBarrierWithGroupSync" />
|
||||
<Key word = "any" />
|
||||
<Key word = "asdouble" />
|
||||
<Key word = "asfloat" />
|
||||
<Key word = "asin" />
|
||||
<Key word = "asint" />
|
||||
<Key word = "asint" />
|
||||
<Key word = "asuint" />
|
||||
<Key word = "asuint" />
|
||||
<Key word = "atan" />
|
||||
<Key word = "atan2" />
|
||||
<Key word = "ceil" />
|
||||
<Key word = "CheckAccessFullyMapped" />
|
||||
<Key word = "clamp" />
|
||||
<Key word = "clip" />
|
||||
<Key word = "cos" />
|
||||
<Key word = "cosh" />
|
||||
<Key word = "countbits" />
|
||||
<Key word = "cross" />
|
||||
<Key word = "D3DCOLORtoUBYTE4" />
|
||||
<Key word = "ddx" />
|
||||
<Key word = "ddx_coarse" />
|
||||
<Key word = "ddx_fine" />
|
||||
<Key word = "ddy" />
|
||||
<Key word = "ddy_coarse" />
|
||||
<Key word = "ddy_fine" />
|
||||
<Key word = "degrees" />
|
||||
<Key word = "determinant" />
|
||||
<Key word = "DeviceMemoryBarrier" />
|
||||
<Key word = "DeviceMemoryBarrierWithGroupSync" />
|
||||
<Key word = "distance" />
|
||||
<Key word = "dot" />
|
||||
<Key word = "dst" />
|
||||
<Key word = "errorf" />
|
||||
<Key word = "EvaluateAttributeAtCentroid" />
|
||||
<Key word = "EvaluateAttributeAtSample" />
|
||||
<Key word = "EvaluateAttributeSnapped" />
|
||||
<Key word = "exp" />
|
||||
<Key word = "exp2" />
|
||||
<Key word = "f16tof32" />
|
||||
<Key word = "f32tof16" />
|
||||
<Key word = "faceforward" />
|
||||
<Key word = "firstbithigh" />
|
||||
<Key word = "firstbitlow" />
|
||||
<Key word = "floor" />
|
||||
<Key word = "fma" />
|
||||
<Key word = "fmod" />
|
||||
<Key word = "frac" />
|
||||
<Key word = "frexp" />
|
||||
<Key word = "fwidth" />
|
||||
<Key word = "GetRenderTargetSampleCount" />
|
||||
<Key word = "GetRenderTargetSamplePosition" />
|
||||
<Key word = "GroupMemoryBarrier" />
|
||||
<Key word = "GroupMemoryBarrierWithGroupSync" />
|
||||
<Key word = "InterlockedAdd" />
|
||||
<Key word = "InterlockedAnd" />
|
||||
<Key word = "InterlockedCompareExchange" />
|
||||
<Key word = "InterlockedCompareStore" />
|
||||
<Key word = "InterlockedExchange" />
|
||||
<Key word = "InterlockedMax" />
|
||||
<Key word = "InterlockedMin" />
|
||||
<Key word = "InterlockedOr" />
|
||||
<Key word = "InterlockedXor" />
|
||||
<Key word = "isfinite" />
|
||||
<Key word = "isinf" />
|
||||
<Key word = "isnan" />
|
||||
<Key word = "ldexp" />
|
||||
<Key word = "length" />
|
||||
<Key word = "lerp" />
|
||||
<Key word = "lit" />
|
||||
<Key word = "log" />
|
||||
<Key word = "log10" />
|
||||
<Key word = "log2" />
|
||||
<Key word = "mad" />
|
||||
<Key word = "max" />
|
||||
<Key word = "min" />
|
||||
<Key word = "modf" />
|
||||
<Key word = "msad4" />
|
||||
<Key word = "mul" />
|
||||
<Key word = "noise" />
|
||||
<Key word = "normalize" />
|
||||
<Key word = "pow" />
|
||||
<Key word = "printf" />
|
||||
<Key word = "Process2DQuadTessFactorsAvg" />
|
||||
<Key word = "Process2DQuadTessFactorsMax" />
|
||||
<Key word = "Process2DQuadTessFactorsMin" />
|
||||
<Key word = "ProcessIsolineTessFactors" />
|
||||
<Key word = "ProcessQuadTessFactorsAvg" />
|
||||
<Key word = "ProcessQuadTessFactorsMax" />
|
||||
<Key word = "ProcessQuadTessFactorsMin" />
|
||||
<Key word = "ProcessTriTessFactorsAvg" />
|
||||
<Key word = "ProcessTriTessFactorsMax" />
|
||||
<Key word = "ProcessTriTessFactorsMin" />
|
||||
<Key word = "radians" />
|
||||
<Key word = "rcp" />
|
||||
<Key word = "reflect" />
|
||||
<Key word = "refract" />
|
||||
<Key word = "reversebits" />
|
||||
<Key word = "round" />
|
||||
<Key word = "rsqrt" />
|
||||
<Key word = "saturate" />
|
||||
<Key word = "sign" />
|
||||
<Key word = "sin" />
|
||||
<Key word = "sincos" />
|
||||
<Key word = "sinh" />
|
||||
<Key word = "smoothstep" />
|
||||
<Key word = "sqrt" />
|
||||
<Key word = "step" />
|
||||
<Key word = "tan" />
|
||||
<Key word = "tanh" />
|
||||
<Key word = "tex1D" />
|
||||
<Key word = "tex1D" />
|
||||
<Key word = "tex1Dbias" />
|
||||
<Key word = "tex1Dgrad" />
|
||||
<Key word = "tex1Dlod" />
|
||||
<Key word = "tex1Dproj" />
|
||||
<Key word = "tex2D" />
|
||||
<Key word = "tex2D" />
|
||||
<Key word = "tex2Dbias" />
|
||||
<Key word = "tex2Dgrad" />
|
||||
<Key word = "tex2Dlod" />
|
||||
<Key word = "tex2Dproj" />
|
||||
<Key word = "tex3D" />
|
||||
<Key word = "tex3D" />
|
||||
<Key word = "tex3Dbias" />
|
||||
<Key word = "tex3Dgrad" />
|
||||
<Key word = "tex3Dlod" />
|
||||
<Key word = "tex3Dproj" />
|
||||
<Key word = "texCUBE" />
|
||||
<Key word = "texCUBE" />
|
||||
<Key word = "texCUBEbias" />
|
||||
<Key word = "texCUBEgrad" />
|
||||
<Key word = "texCUBElod" />
|
||||
<Key word = "texCUBEproj" />
|
||||
<Key word = "transpose" />
|
||||
<Key word = "trunc" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "Literals" bold="true" italic="false" color="White">
|
||||
<Key word = "false" />
|
||||
<Key word = "true" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "IterationStatements" bold="true" italic="false" color="#FFFF40">
|
||||
<Key word = "do" />
|
||||
<Key word = "for" />
|
||||
<Key word = "while" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "JumpStatements" bold="true" italic="false" color="#FFFF40">
|
||||
<Key word = "break" />
|
||||
<Key word = "continue" />
|
||||
<Key word = "goto" />
|
||||
<Key word = "return" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "SelectionStatements" bold="true" italic="false" color="#FF8040">
|
||||
<Key word = "case" />
|
||||
<Key word = "else" />
|
||||
<Key word = "if" />
|
||||
<Key word = "switch" />
|
||||
<Key word = "default" />
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name = "KEYWORD1" bold="false" italic="false" color="#26F9AD">
|
||||
<Key word = "asm" />
|
||||
<Key word = "auto" />
|
||||
<Key word = "compl" />
|
||||
<Key word = "mutable" />
|
||||
<Key word = "const_cast" />
|
||||
<Key word = "delete" />
|
||||
<Key word = "dynamic_cast" />
|
||||
<Key word = "explicit" />
|
||||
<Key word = "export" />
|
||||
<Key word = "extern" />
|
||||
<Key word = "inline" />
|
||||
<Key word = "int" />
|
||||
<Key word = "long" />
|
||||
<Key word = "operator" />
|
||||
<Key word = "register" />
|
||||
<Key word = "reinterpret_cast" />
|
||||
<Key word = "sizeof" />
|
||||
<Key word = "static_cast" />
|
||||
<Key word = "template" />
|
||||
<Key word = "typedef" />
|
||||
<Key word = "typeid" />
|
||||
<Key word = "typename" />
|
||||
<Key word = "typename" />
|
||||
|
||||
</KeyWords>
|
||||
|
||||
</RuleSet>
|
||||
</RuleSets>
|
||||
</SyntaxDefinition>
|
||||
145
netpoet-coop-8k/src/tool/ImageSourceService.cs
Normal file
145
netpoet-coop-8k/src/tool/ImageSourceService.cs
Normal file
@@ -0,0 +1,145 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows;
|
||||
using System.Net.Cache;
|
||||
|
||||
namespace tool
|
||||
{
|
||||
public static class ImageSourceService
|
||||
{
|
||||
public struct Options
|
||||
{
|
||||
public bool m_bPreserveAspectAndHeight;
|
||||
public int m_iDesiredWidth;
|
||||
public int m_iDesiredHeight;
|
||||
}
|
||||
|
||||
public static ImageSource GetImageSource(string _sPath, Options? _options = null)
|
||||
{
|
||||
lock (s_dCache)
|
||||
{
|
||||
_sPath = SanitizePath(_sPath);
|
||||
if (string.IsNullOrEmpty(_sPath))
|
||||
return null;
|
||||
|
||||
var key = new Tuple<string, Options?>(_sPath, _options);
|
||||
|
||||
if (s_dCache.ContainsKey(key))
|
||||
return s_dCache[key];
|
||||
|
||||
ImageSource result = null;
|
||||
var bi = new BitmapImage();
|
||||
result = bi;
|
||||
try
|
||||
{
|
||||
if (_sPath.StartsWith("pack:"))
|
||||
{
|
||||
bi.BeginInit();
|
||||
bi.UriSource = new Uri(_sPath);
|
||||
bi.EndInit();
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var stream = new FileStream(_sPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
bi.BeginInit();
|
||||
bi.StreamSource = stream;
|
||||
bi.CacheOption = BitmapCacheOption.OnLoad;
|
||||
bi.EndInit();
|
||||
}
|
||||
}
|
||||
|
||||
s_dDimensions[key.Item1] = bi.PixelWidth + " x " + bi.PixelHeight + "px";
|
||||
|
||||
if (_options.HasValue)
|
||||
{
|
||||
var iWidth = _options.Value.m_iDesiredWidth;
|
||||
var iHeight = _options.Value.m_iDesiredHeight;
|
||||
if (_options.Value.m_bPreserveAspectAndHeight)
|
||||
{
|
||||
iWidth = (int)Math.Max(1, iHeight * bi.PixelWidth / bi.PixelHeight);
|
||||
}
|
||||
result = CreateResizedImage(bi, iWidth, iHeight);
|
||||
}
|
||||
|
||||
s_dCache[key] = result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result = null;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
private static string SanitizePath(string _sPath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_sPath))
|
||||
return null;
|
||||
|
||||
if (_sPath[1] == ':')
|
||||
_sPath = System.IO.Path.GetFullPath(_sPath);
|
||||
|
||||
return _sPath;
|
||||
}
|
||||
|
||||
public static BitmapFrame CreateResizedImage(ImageSource source, int width, int height)
|
||||
{
|
||||
var rect = new Rect(0, 0, width, height);
|
||||
|
||||
var group = new DrawingGroup();
|
||||
RenderOptions.SetBitmapScalingMode(group, BitmapScalingMode.HighQuality);
|
||||
group.Children.Add(new ImageDrawing(source, rect));
|
||||
|
||||
var drawingVisual = new DrawingVisual();
|
||||
using (var drawingContext = drawingVisual.RenderOpen())
|
||||
drawingContext.DrawDrawing(group);
|
||||
|
||||
var resizedImage = new RenderTargetBitmap(
|
||||
width, height, // Resized dimensions
|
||||
96, 96, // Default DPI values
|
||||
PixelFormats.Default); // Default pixel format
|
||||
resizedImage.Render(drawingVisual);
|
||||
|
||||
return BitmapFrame.Create(resizedImage);
|
||||
}
|
||||
|
||||
public static void ClearCache()
|
||||
{
|
||||
var toRemove = s_dCache.Keys.Where(k => !k.Item1.StartsWith("pack:")).ToList();
|
||||
foreach (var key in toRemove)
|
||||
{
|
||||
s_dCache.Remove(key);
|
||||
}
|
||||
|
||||
if (OnCacheCleared != null)
|
||||
{
|
||||
OnCacheCleared(null, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetDimensions(string _sPath)
|
||||
{
|
||||
_sPath = SanitizePath(_sPath);
|
||||
if (string.IsNullOrEmpty(_sPath))
|
||||
return null;
|
||||
|
||||
if (!s_dDimensions.ContainsKey(_sPath))
|
||||
return null;
|
||||
|
||||
return s_dDimensions[_sPath];
|
||||
}
|
||||
|
||||
private static Dictionary<Tuple<string, Options?>, ImageSource> s_dCache = new Dictionary<Tuple<string, Options?>, ImageSource>();
|
||||
private static Dictionary<string, string> s_dDimensions = new Dictionary<string, string>();
|
||||
|
||||
public static event EventHandler OnCacheCleared;
|
||||
}
|
||||
}
|
||||
BIN
netpoet-coop-8k/src/tool/Images/audio.png
Normal file
BIN
netpoet-coop-8k/src/tool/Images/audio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
netpoet-coop-8k/src/tool/Images/bigerror.png
Normal file
BIN
netpoet-coop-8k/src/tool/Images/bigerror.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
netpoet-coop-8k/src/tool/Images/biginfo.png
Normal file
BIN
netpoet-coop-8k/src/tool/Images/biginfo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
netpoet-coop-8k/src/tool/Images/error.png
Normal file
BIN
netpoet-coop-8k/src/tool/Images/error.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 909 B |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user