// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. /*============================================================================= Definitions.usf: Defines undefined defines to 0 as Cg can't handle them. =============================================================================*/ #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 MESH_MATERIAL_SHADER #define MESH_MATERIAL_SHADER 0 #endif #ifndef OUTPUT_DEPTH_TO_ALPHA #define OUTPUT_DEPTH_TO_ALPHA 0 #endif #ifndef COMPILER_CG #define COMPILER_CG 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_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 METAL_PROFILE #define METAL_PROFILE 0 #endif #ifndef IOS #define IOS 0 #endif #ifndef MAC #define MAC 0 #endif #ifndef USING_TESSELLATION #define USING_TESSELLATION 0 #endif #ifndef OPENGL #define OPENGL 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 #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] /** Executes the conditional part of an if statement when the condition is true for all threads on which the current shader is running. */ #define IFALL [ifAll] /** Executes the conditional part of an if statement when the condition is true for any thread on which the current shader is running. */ #define IFANY [ifAny] #else #ifndef UNROLL #define UNROLL #endif #ifndef LOOP #define LOOP #endif #ifndef BRANCH #define BRANCH #endif #ifndef FLATTEN #define FLATTEN #endif #ifndef IFALL #define IFALL #endif #ifndef IFANY #define IFANY #endif #endif #define ISOLATE #define NOEXPRESSIONOPTIMIZATIONS #if SM5_PROFILE #define EARLYDEPTHSTENCIL [earlydepthstencil] #else #define EARLYDEPTHSTENCIL #endif