- Designing a Modern GPU Interface by @BrookeHodgman
- Design Patterns for Low-Level Real-time Rendering by @nlguillemot
- Optimizing the Graphics Pipeline with Compute by @gwihlidal
- GPU Driven Rendering Pipelines by @SebAaltonen
- Destiny’s Multi-threaded Renderer Architecture by @Mirror2Mask
- Stingray Renderer Walkthrough by @tobias_persson
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
{"lastUpload":"2020-03-03T01:09:57.408Z","extensionVersion":"v3.4.3"} |
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
HRESULT CreateInputLayoutDescFromVertexShaderSignature( ID3DBlob* pShaderBlob, ID3D11Device* pD3DDevice, ID3D11InputLayout** pInputLayout ) | |
{ | |
// Reflect shader info | |
ID3D11ShaderReflection* pVertexShaderReflection = NULL; | |
if ( FAILED( D3DReflect( pShaderBlob->GetBufferPointer(), pShaderBlob->GetBufferSize(), IID_ID3D11ShaderReflection, (void**) &pVertexShaderReflection ) ) ) | |
{ | |
return S_FALSE; | |
} | |
// Get shader info |
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
bool PatchManager::GetMD5(const u8 *pBuffer, u32 uBufLen, u8 *rgbHash) | |
{ | |
BOOL bResult = FALSE; | |
HCRYPTPROV hProv = 0; | |
HCRYPTHASH hHash = 0; | |
DWORD cbRead = 0; | |
DWORD cbHash = 0; | |
CHAR rgbDigits[] = "0123456789ABCDEF"; | |
// Get handle to the crypto provider |
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
auto f = begin(expanded_panels_) + fixed_index; | |
// 发现其实expanded_panels其实是根据cur_panel_center已经排好序了 | |
auto p = lower_bound(begin(expanded_panels_), f, | |
[&](const ref_ptr<Panel>& e){ return center_x <= e->cur_panel_center(); }); | |
rotate(p, f, f + 1); | |
// 总结 | |
// 上面代码更加高效 | |
// 更加清楚表达含义,review代码的人不用去考虑边界条件因为算法都保证好了 | |
// 以上代码只是选择单个panel移动,但是非常容易扩展成多个panel向右移动 |
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
#include "stdafx.h" | |
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include <cassert> | |
#include <chrono> | |
#include <thread> | |
#include <future> |
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
# remove various cast | |
replace \(\([\w.]+\) | |
with ( | |
# change this with self | |
# change size 10F to 10 | |
replace (\d+)F | |
with $1 | |
# replace } as ,) replace { as ( when AddRange |
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
/*!-------------------------------------------------------- | |
* Copyright (C) Microsoft Corporation. All rights reserved. | |
*--------------------------------------------------------*/ | |
/** | |
* marked - a markdown parser | |
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) | |
* https://github.com/chjj/marked | |
*/ | |
function Lexer(e) { | |
this.tokens = [], this.tokens.links = {}, this.options = e || marked.defaults, this.rules = block.normal, this.options.gfm && (this.options.tables ? this.rules = block.tables : this.rules = block.gfm) |
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
#include <stdio.h> | |
#include <functional> | |
void foo( int i ) | |
{ | |
auto f = [=]() { printf("%d\n", i); }; | |
f(); | |
} |
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
https://github.com/seebi/tmux-colors-solarized | |
https://github.com/altercation/solarized/tree/master/putty-colors-solarized | |
https://puttytray.goeswhere.com/ | |
https://github.com/altercation/ethanschoonover.com/blob/master/projects/solarized/README.md |
NewerOlder