This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Module Version 10000 | |
// Generated by (magic number): 80003 | |
// Id's are bound by 1113 | |
Capability Shader | |
Capability SampleRateShading | |
1: ExtInstImport "GLSL.std.450" | |
MemoryModel Logical GLSL450 | |
EntryPoint Fragment 4 "main" 1081 1085 1089 1092 1095 1098 1101 1104 1108 | |
ExecutionMode 4 OriginUpperLeft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Module Version 10000 | |
// Generated by (magic number): 80003 | |
// Id's are bound by 132 | |
Capability Shader | |
1: ExtInstImport "GLSL.std.450" | |
MemoryModel Logical GLSL450 | |
EntryPoint Vertex 4 "main" 85 89 92 95 98 106 110 114 117 120 123 126 129 | |
Source HLSL 500 | |
Name 4 "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating a node graph editor for ImGui | |
// Quick demo, not production code! This is more of a demo of how to use ImGui to create custom stuff. | |
// Better version by @daniel_collin here https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2 | |
// See https://github.com/ocornut/imgui/issues/306 | |
// v0.02 | |
// Animated gif: https://cloud.githubusercontent.com/assets/8225057/9472357/c0263c04-4b4c-11e5-9fdf-2cd4f33f6582.gif | |
// NB: You can use math functions/operators on ImVec2 if you #define IMGUI_DEFINE_MATH_OPERATORS and #include "imgui_internal.h" | |
// Here we only declare simple +/- operators so others don't leak into the demo code. | |
static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the texture from OpenEXR | |
{ | |
DirectX::TexMetadata metaData; | |
DirectX::ScratchImage scratchImage; | |
ThrowIfFailed(LoadFromEXRFile(L"exrtest.exr", &metaData, scratchImage)); | |
const size_t subresoucesize = metaData.mipLevels; | |
const size_t uploadBufferSize = scratchImage.GetPixelsSize(); | |
D3D12_RESOURCE_DESC textureDesc = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load texture from DDS. | |
{ | |
std::unique_ptr<uint8_t[]> ddsData; | |
std::vector<D3D12_SUBRESOURCE_DATA> subresouceData; | |
ThrowIfFailed(LoadDDSTextureFromFile(m_device.Get(), | |
L"test.DDS", | |
&m_texture, | |
ddsData, | |
subresouceData)); | |
D3D12_RESOURCE_DESC textureDesc = m_texture->GetDesc(); |