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
#pragma once | |
#define AES_COMPILER_UNKNOWN 0 | |
#define AES_COMPILER_MSVC 1 | |
#define AES_COMPILER_GCC 2 | |
#define AES_COMPILER_ICC 3 | |
#define AES_COMPILER_CLANG 4 | |
#if defined(__clang__) | |
#define AES_COMPILER AES_COMPILER_CLANG |
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; |
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
fixed G (fixed4 c) { return .299 * c.r + .587 * c.g + .114 * c.b; } | |
fixed4 Darken (fixed4 a, fixed4 b) | |
{ | |
fixed4 r = min(a, b); | |
r.a = b.a; | |
return r; | |
} | |
fixed4 Multiply (fixed4 a, fixed4 b) |