sebastienlagarde
7 年前
当前提交
de305043
共有 5 个文件被更改,包括 91 次插入 和 28 次删除
-
2TestbedPipelines/OnTileDeferredPipeline/Shaders/LightingTemplate.hlsl
-
29TestbedPipelines/OnTileDeferredPipeline/Shaders/Standard.shader
-
29TestbedPipelines/OnTileDeferredPipeline/Shaders/StandardSpecular.shader
-
50TestbedPipelines/OnTileDeferredPipeline/Shaders/OnTileCommon.hlsl
-
9TestbedPipelines/OnTileDeferredPipeline/Shaders/OnTileCommon.hlsl.meta
|
|||
|
|||
// The function of the shader library are stateless, no uniform decalare in it. |
|||
// Any function that require an explicit precision, use float or half qualifier, when the function can support both, it use real (see below) |
|||
// If a function require to have both a half and a float version, then both need to be explicitly define |
|||
#ifndef real |
|||
|
|||
#ifdef SHADER_API_MOBILE |
|||
#define real half |
|||
#define real2 half2 |
|||
#define real3 half3 |
|||
#define real4 half4 |
|||
|
|||
#define real2x2 half2x2 |
|||
#define real2x3 half2x3 |
|||
#define real3x2 half3x2 |
|||
#define real3x3 half3x3 |
|||
#define real3x4 half3x4 |
|||
#define real4x3 half4x3 |
|||
#define real4x4 half4x4 |
|||
|
|||
#define REAL_MIN HALF_MIN |
|||
#define REAL_MAX HALF_MAX |
|||
#define TEMPLATE_1_REAL TEMPLATE_1_HALF |
|||
#define TEMPLATE_2_REAL TEMPLATE_2_HALF |
|||
#define TEMPLATE_3_REAL TEMPLATE_3_HALF |
|||
|
|||
#else |
|||
|
|||
#define real float |
|||
#define real2 float2 |
|||
#define real3 float3 |
|||
#define real4 float4 |
|||
|
|||
#define real2x2 float2x2 |
|||
#define real2x3 float2x3 |
|||
#define real3x2 float3x2 |
|||
#define real3x3 float3x3 |
|||
#define real3x4 float3x4 |
|||
#define real4x3 float4x3 |
|||
#define real4x4 float4x4 |
|||
|
|||
#define REAL_MIN FLT_MIN |
|||
#define REAL_MAX FLT_MAX |
|||
#define TEMPLATE_1_REAL TEMPLATE_1_FLT |
|||
#define TEMPLATE_2_REAL TEMPLATE_2_FLT |
|||
#define TEMPLATE_3_REAL TEMPLATE_3_FLT |
|||
|
|||
#endif // SHADER_API_MOBILE |
|||
|
|||
#endif // #ifndef real |
|
|||
fileFormatVersion: 2 |
|||
guid: 0d2d72d5a6eba1946bf9fd0737251cd4 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue