Files
UnrealEngineUWP/Engine/Shaders/Definitions.usf
Marc Audy 6183efcc36 Integrate Engine/Config, Engine/Plugins, Engine/Programs, Engine/Shaders and remaining Engine/Source from UE4-Orion to UE4 at CL# 2716634
#lockdown Ben.Marsh
#platformnotify Josh.Adams

[CL 2718314 by Marc Audy in Main branch]
2015-10-06 16:47:09 -04:00

268 lines
5.4 KiB
Plaintext

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
Definitions.usf: Defines undefined defines to 0 as Cg can't handle them.
=============================================================================*/
#pragma once
#ifndef MATERIAL_TWOSIDED
#define MATERIAL_TWOSIDED 0
#endif
#ifndef MATERIAL_TANGENTSPACENORMAL
#define MATERIAL_TANGENTSPACENORMAL 0
#endif
#ifndef MATERIAL_TWOSIDED_SEPARATE_PASS
#define MATERIAL_TWOSIDED_SEPARATE_PASS 0
#endif
#ifndef MATERIALBLENDING_MASKED
#define MATERIALBLENDING_MASKED 0
#endif
#ifndef MATERIALBLENDING_TRANSLUCENT
#define MATERIALBLENDING_TRANSLUCENT 0
#endif
#ifndef MATERIALBLENDING_ADDITIVE
#define MATERIALBLENDING_ADDITIVE 0
#endif
#ifndef MATERIALBLENDING_MODULATE
#define MATERIALBLENDING_MODULATE 0
#endif
#ifndef MATERIAL_SHADINGMODEL_DEFAULT_LIT
#define MATERIAL_SHADINGMODEL_DEFAULT_LIT 0
#endif
#ifndef MATERIAL_SHADINGMODEL_SUBSURFACE
#define MATERIAL_SHADINGMODEL_SUBSURFACE 0
#endif
#ifndef MATERIAL_SHADINGMODEL_PREINTEGRATED_SKIN
#define MATERIAL_SHADINGMODEL_PREINTEGRATED_SKIN 0
#endif
#ifndef MATERIAL_SHADINGMODEL_UNLIT
#define MATERIAL_SHADINGMODEL_UNLIT 0
#endif
#ifndef HAS_PRIMITIVE_UNIFORM_BUFFER
#define HAS_PRIMITIVE_UNIFORM_BUFFER 0
#endif
#ifndef OUTPUT_DEPTH_TO_ALPHA
#define OUTPUT_DEPTH_TO_ALPHA 0
#endif
#ifndef COMPILER_HLSLCC
#define COMPILER_HLSLCC 0
#endif
#ifndef COMPILER_HLSL
#define COMPILER_HLSL 0
#endif
#ifndef COMPILER_GLSL
#define COMPILER_GLSL 0
#endif
#ifndef COMPILER_GLSL_ES2
#define COMPILER_GLSL_ES2 0
#endif
#ifndef COMPILER_METAL
#define COMPILER_METAL 0
#endif
#ifndef COMPILER_SUPPORTS_ATTRIBUTES
#define COMPILER_SUPPORTS_ATTRIBUTES 0
#endif
#ifndef SM5_PROFILE
#define SM5_PROFILE 0
#endif
#ifndef SM4_PROFILE
#define SM4_PROFILE 0
#endif
#ifndef ES2_PROFILE
#define ES2_PROFILE 0
#endif
#ifndef ES3_1_PROFILE
#define ES3_1_PROFILE 0
#endif
#ifndef METAL_PROFILE
#define METAL_PROFILE 0
#endif
#ifndef METAL_MRT_PROFILE
#define METAL_MRT_PROFILE 0
#endif
#ifndef METAL_SM4_PROFILE
#define METAL_SM4_PROFILE 0
#endif
#ifndef METAL_SM5_PROFILE
#define METAL_SM5_PROFILE 0
#endif
#ifndef VULKAN_PROFILE
#define VULKAN_PROFILE 0
#endif
#ifndef IOS
#define IOS 0
#endif
#ifndef MAC
#define MAC 0
#endif
#ifndef USING_TESSELLATION
#define USING_TESSELLATION 0
#endif
#ifndef OUTPUT_GBUFFER_VELOCITY
#define OUTPUT_GBUFFER_VELOCITY 0
#endif
#define PC_D3D SM5_PROFILE
#ifndef NEEDS_LIGHTMAP_COORDINATE
#define NEEDS_LIGHTMAP_COORDINATE 0
#endif
#ifndef TESSELLATION_TYPE_FLAT
#define TESSELLATION_TYPE_FLAT 0
#endif
#ifndef TESSELLATION_TYPE_PNTRIANGLES
#define TESSELLATION_TYPE_PNTRIANGLES 0
#endif
#ifndef USE_ADAPTIVE_TESSELLATION_FACTOR
#define USE_ADAPTIVE_TESSELLATION_FACTOR 1
#endif
#ifndef LANDSCAPE_XYOFFSET
#define LANDSCAPE_XYOFFSET 0
#endif
#ifndef MATERIAL_ATMOSPHERIC_FOG
#define MATERIAL_ATMOSPHERIC_FOG 0
#endif
#ifndef BASEPASS_ATMOSPHERIC_FOG
#define BASEPASS_ATMOSPHERIC_FOG 0
#endif
#ifndef NUM_VF_PACKED_INTERPOLANTS
#define NUM_VF_PACKED_INTERPOLANTS 0
#endif
#ifndef INVARIANT
#define INVARIANT
#endif
#ifndef REVERSEBITS
#define REVERSEBITS reversebits
#endif
#ifndef ENABLE_RE_Z
#define ENABLE_RE_Z
#endif
#ifndef USE_CLEARCOAT
#define USE_CLEARCOAT 0
#endif
#if SM5_PROFILE || COMPILER_SUPPORTS_ATTRIBUTES
/** Avoids flow control constructs. */
#define UNROLL [unroll]
/** Gives preference to flow control constructs. */
#define LOOP [loop]
/** Performs branching by using control flow instructions like jmp and label. */
#define BRANCH [branch]
/** Performs branching by using the cnd instructions. */
#define FLATTEN [flatten]
/** Allows a compute shader loop termination condition to be based off of a UAV read. The loop must not contain synchronization intrinsics. */
#define ALLOW_UAV_CONDITION [allow_uav_condition]
#else
#ifndef UNROLL
#define UNROLL
#endif
#ifndef LOOP
#define LOOP
#endif
#ifndef BRANCH
#define BRANCH
#endif
#ifndef FLATTEN
#define FLATTEN
#endif
#endif
#define ISOLATE
#define NOEXPRESSIONOPTIMIZATIONS
#if SM5_PROFILE
#define EARLYDEPTHSTENCIL [earlydepthstencil]
#else
#define EARLYDEPTHSTENCIL
#endif
#ifndef HAS_INVERTED_Z_BUFFER
#define HAS_INVERTED_Z_BUFFER 1
#endif
#ifndef COMPRESSED_16_FLOAT
#define COMPRESSED_16_FLOAT
#endif
#ifndef COMPRESSED_16_UNORM
#define COMPRESSED_16_UNORM
#endif
#ifndef COMPRESSED_16_SNORM
#define COMPRESSED_16_SNORM
#endif
#ifndef COMPRESSED_16_UINT
#define COMPRESSED_16_UINT
#endif
#ifndef COMPRESSED_16_INT
#define COMPRESSED_16_INT
#endif
#ifndef COMPRESSED_8_UNORM
#define COMPRESSED_8_UNORM
#endif
#ifndef COMPRESSED_8_SNORM
#define COMPRESSED_8_SNORM
#endif
#ifndef COMPRESSED_8_UINT
#define COMPRESSED_8_UINT
#endif
/** When defined sets the layer index for volumetric rendering in the vertex shader, rather than using a geometry shader */
#ifndef USING_VERTEX_SHADER_LAYER
#define USING_VERTEX_SHADER_LAYER 0
#endif
// 'static' asserts
#if COMPILER_GLSL || COMPILER_GLSL_ES2 || VULKAN_PROFILE || METAL_PROFILE || METAL_MRT_PROFILE || METAL_SM4_PROFILE || METAL_SM5_PROFILE
#if !COMPILER_HLSLCC
#error "Missing COMPILER_HLSLCC define!"
#endif
#endif