Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

// 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
// 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"
@shaderjp
shaderjp / imgui_node_graph_test.cpp
Created November 22, 2017 01:41 — forked from ocornut/imgui_node_graph_test.cpp
Node graph editor basic demo for ImGui
// 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); }
@shaderjp
shaderjp / D3D12HelloEXR.cpp
Created October 3, 2017 14:55
Create the texture from OpenEXR
// 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 = {};
@shaderjp
shaderjp / Load texture from DDS.cpp
Last active September 28, 2017 12:47
DirectXTexのDDSロードサンプル
// 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();