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
rem Script for setting up new Windows 11 PC for graphic development | |
rem You need need to run it with administator rights | |
rem You can modify list of installed software below | |
rem Windows explorer settings | |
rem Sets option to always show file extensions | |
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f | |
rem Sets option to show hidden files (but not OS protected files) | |
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 1 /f | |
rem Sets option to show full path instead of just folder name in file explorer window title |
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
template <typename T> | |
class function; | |
template <typename Return, typename... Args> | |
class function<Return(Args...)> | |
{ | |
public: | |
function() {} | |
template <class T, typename = typename enable_if<is_invocable<T, Args...>::value>::type> |
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
In shader programming, you often run into a problem where you want to iterate an array in memory over all pixels in a compute shader | |
group (tile). Tiled deferred lighting is the most common case. 8x8 tile loops over a light list culled for that tile. | |
Simplified HLSL code looks like this: | |
Buffer<float4> lightDatas; | |
Texture2D<uint2> lightStartCounts; | |
RWTexture2D<float4> output; | |
[numthreads(8, 8, 1)] |
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
/* =============================================================== | |
* SDEFL | |
* =============================================================== | |
* public domain - no warranty implied; use at your own risk | |
* References: | |
https://bitbucket.org/rmitton/tigr/src/be3832bee7fb2f274fe5823e38f8ec7fa94e0ce9/src/tigr_inflate.c?at=default&fileviewer=file-view-default | |
https://github.com/github/putty/blob/49fb598b0e78d09d6a2a42679ee0649df482090e/sshzlib.c | |
https://www.ietf.org/rfc/rfc1951.txt | |
*/ | |
#include <stdlib.h> |
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 <glm/matrix.hpp> | |
class Frustum | |
{ | |
public: | |
Frustum() {} | |
// m = ProjectionMatrix * ViewMatrix | |
Frustum(glm::mat4 m); |
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
/*---------------------------------------------------------------------------------------------------------------------- | |
Custom cross-product: mad + mul | |
----------------------------------------------------------------------------------------------------------------------*/ | |
half3 crs(half3 v0, half3 v1) | |
{ | |
//return cross(v0, v1); | |
half3 v0_0 = v0.yzx; | |
half3 v0_1 = v1.zxy; | |
half3 v1_0 = v0.zxy; | |
half3 v1_1 = v1.yzx; |