Revision | 6158b1e636ea9b9497cd12cbffde6960b4cb29e9 (tree) |
---|---|
Time | 2018-09-23 06:30:39 |
Author | Matias N. Goldberg <dark_ <sylinc@yaho...> |
Commiter | Matias N. Goldberg <dark_ |
Ported latest Area light changes to HLSL & Metal
@@ -43,12 +43,12 @@ | ||
43 | 43 | uniform sampler2DArray ltcMatrix; |
44 | 44 | @end |
45 | 45 | @property( syntax == hlsl ) |
46 | - Texture2DArray<float4> ltcMatrix : register(t@value()); | |
47 | - SamplerState ltcSampler : register(s@value()); | |
46 | + Texture2DArray<float4> ltcMatrix : register(t@value(ltcMatrixTexUnit)); | |
47 | + SamplerState ltcSampler : register(s@value(ltcMatrixTexUnit)); | |
48 | 48 | @end |
49 | 49 | @property( syntax == metal ) |
50 | - , texture2d_array<half> ltcMatrix [[texture(@value())]] | |
51 | - , sampler ltcSampler [[sampler(@value())]] | |
50 | + , texture2d_array<half> ltcMatrix [[texture(@value(ltcMatrixTexUnit))]] | |
51 | + , sampler ltcSampler [[sampler(@value(ltcMatrixTexUnit))]] | |
52 | 52 | @end |
53 | 53 | @end |
54 | 54 | @end |
@@ -32,6 +32,11 @@ | ||
32 | 32 | @add( texUnit, 1 ) |
33 | 33 | @end |
34 | 34 | |
35 | +@property( hlms_lights_area_ltc ) | |
36 | + @set( ltcMatrixTexUnit, texUnit ) | |
37 | + @add( texUnit, 1 ) | |
38 | +@end | |
39 | + | |
35 | 40 | @property( hlms_enable_decals ) |
36 | 41 | @set( decalsTexUnit, texUnit ) |
37 | 42 | @add( texUnit, hlms_enable_decals ) |
@@ -27,6 +27,11 @@ | ||
27 | 27 | @add( texUnit, 1 ) |
28 | 28 | @end |
29 | 29 | |
30 | +@property( hlms_lights_area_ltc ) | |
31 | + @set( ltcMatrixTexUnit, texUnit ) | |
32 | + @add( texUnit, 1 ) | |
33 | +@end | |
34 | + | |
30 | 35 | @property( hlms_enable_decals ) |
31 | 36 | @set( decalsTexUnit, texUnit ) |
32 | 37 | @add( texUnit, hlms_enable_decals ) |