Subversion Repository Public Repository

Divide-Dependencies

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#ifndef DEFINES_CG
#define DEFINES_CG

#define __in(argType, argName, argSemantic) argType argName : argSemantic

#ifdef RENDERER_GNM
#define JOIN2(a, b) a##b
#define JOIN(a, b) JOIN2(a, b)

#define BEGIN_CBUFFER(name)
#define END_CBUFFER(name)
#define CONST_TYPE
#define DECLARE_TEXTURE(textureName)        Texture2D textureName; SamplerState JOIN(textureName,SamplerState);
#define DECLARE_TEXTURE_3D(textureName)     Texture3D textureName; SamplerState JOIN(textureName,SamplerState);
#define tex2D(textureName,textureCoord)     textureName.Sample(JOIN(textureName,SamplerState), textureCoord)
#define tex2Dproj(textureName,textureCoord) textureName.Sample(JOIN(textureName,SamplerState), textureCoord.xy).x <= 

#define __in_opt(argType, argName, argSemantic) , __in(argType, argName, argSemantic)

#define COLOR0 S_TARGET_OUTPUT
#define half3 float3
#define half4 float4
#define half float

#elif !defined(RENDERER_D3D11)

#define BEGIN_CBUFFER(name)
#define END_CBUFFER(name)
#define CONST_TYPE               uniform const
#define DECLARE_TEXTURE(name)    uniform const sampler2D name;
#define DECLARE_TEXTURE_3D(name) uniform const sampler3D name;

#define __in_opt(argType, argName, argSemantic) , __in(argType, argName, argSemantic)

#else /* !defined(RENDERER_D3D11) */

#define JOIN2(a, b) a##b
#define JOIN(a, b) JOIN2(a, b)

#define BEGIN_CBUFFER(name) cbuffer name {
#define END_CBUFFER(name)   }
#define CONST_TYPE
#define DECLARE_TEXTURE(textureName)        Texture2D textureName; SamplerState JOIN(textureName,SamplerState);
#define DECLARE_TEXTURE_3D(textureName)     Texture3D textureName; SamplerState JOIN(textureName,SamplerState);
#define tex2D(textureName,textureCoord)     textureName.Sample(JOIN(textureName,SamplerState), textureCoord)
#define tex2Dproj(textureName,textureCoord) textureName.Sample(JOIN(textureName,SamplerState), textureCoord.xy).x <= textureCoord.z ? 0 : 1

#define __in_opt2(argType, argName, argSemantic) JOIN(__in_,argSemantic) (argType, argName, argSemantic)
#define __in_opt(argType, argName, argSemantic) __in_opt2(argType, argName, argSemantic)

#if defined(USE_ALL) || defined(RENDERER_FRAGMENT)
#define USE_POSITION   1
#define USE_NORMAL     1
#define USE_TANGENT    1
#define USE_TEXCOORD0  1
#define USE_TEXCOORD1  1
#define USE_TEXCOORD2  1
#define USE_TEXCOORD3  1
#define USE_COLOR      1
#define USE_BONE       1
#endif

#define __in_POSITION(a,b,c)     __in(a, b, c)

// These semantics are required, not optional, when specified in a shader argument list
#define __in_TEXCOORD6(a,b,c)  , __in(a, b, c)
#define __in_TEXCOORD7(a,b,c)  , __in(a, b, c)
#define __in_TEXCOORD8(a,b,c)  , __in(a, b, c)
#define __in_TEXCOORD9(a,b,c)  , __in(a, b, c)
#define __in_TEXCOORD10(a,b,c) , __in(a, b, c)
#define __in_TEXCOORD11(a,b,c) , __in(a, b, c)
//#define __in_TEXCOORD12(a,b,c) , __in(a, b, c) // Optional instance semantic for uv offsets
//#define __in_TEXCOORD13(a,b,c) , __in(a, b, c) // Optional instance semantic for local offsets
#define __in_TEXCOORD14(a,b,c) , __in(a, b, c)
//#define __in_TEXCOORD15(a,b,c) , __in(a, b, c) // Optional displacement semantic
#define __in_TEXCOORD16(a,b,c) , __in(a, b, c)
#define __in_TEXCOORD17(a,b,c) , __in(a, b, c)

#if USE_NORMAL
#define __in_NORMAL(a,b,c)     , __in(a, b, c)
#else
#define __in_NORMAL(a,b,c)
#define localSpaceNormal float3(1,0,0)
#endif
#if USE_TANGENT
#define __in_TANGENT(a,b,c)    , __in(a, b, c)
#define __in_TEXCOORD5(a,b,c)  , __in(a, b, c)
#else
#define __in_TANGENT(a,b,c)
#define __in_TEXCOORD5(a,b,c)
#define localSpaceTangent float4(1,0,0,1)
#endif
#if USE_TEXCOORD0
#define __in_TEXCOORD0(a,b,c)  , __in(a, b, c)
#else
#define __in_TEXCOORD0(a,b,c)
#define vertexTexcoord0 float4(0,0,0,0)
#endif
#if USE_TEXCOORD1
#define __in_TEXCOORD1(a,b,c)  , __in(a, b, c)
#else
#define __in_TEXCOORD1(A,B,C)
#define vertexTexcoord1 float4(0,0,0,0)
#endif
#if USE_TEXCOORD2
#define __in_TEXCOORD2(a,b,c)  , __in(a, b, c)
#else
#define __in_TEXCOORD2(a,b,c)
#define vertexTexcoord2 float4(0,0,0,0)
#endif
#if USE_TEXCOORD3
#define __in_TEXCOORD3(a,b,c)  , __in(a, b, c)
#else
#define __in_TEXCOORD3(a,b,c)
#define vertexTexcoord3 float4(0,0,0,0)
#endif
#if USE_COLOR
#define __in_COLOR(a,b,c)      , __in(a, b, c)
#else
#define __in_COLOR(a,b,c)
#define vertexColor half4(0,0,0,0)
#endif
#if USE_TEXCOORD12
#define __in_TEXCOORD12(a,b,c)      , __in(a, b, c)
#else
#define __in_TEXCOORD12(a,b,c)
#define instanceUVOffset float2(0,0)
#endif
#if USE_TEXCOORD13
#define __in_TEXCOORD13(a,b,c)      , __in(a, b, c)
#else
#define __in_TEXCOORD13(a,b,c)
#define instanceLocalOffset float3(0,0,0)
#endif
#if USE_TEXCOORD15
#define __in_TEXCOORD15(a,b,c)      , __in(a, b, c)
#else
#define __in_TEXCOORD15(a,b,c)
#define vertexFlagsDisp 0
#endif

#endif /* !defined(RENDERER_D3D11) */

#endif

Commits for Divide-Dependencies/physx/APEX_1.4/media/SampleRenderer/4/shaders/include/defines.cg

Diff revisions: vs.
Revision Author Commited Message
105 IonutCava picture IonutCava Tue 16 Apr, 2019 19:55:41 +0000

Forgot to actually add physx