mirror of
https://github.com/LazyDuchess/OpenTS2.git
synced 2025-01-23 08:41:47 -05:00
11 lines
No EOL
303 B
HLSL
11 lines
No EOL
303 B
HLSL
float _TerrainWidth;
|
|
float _TerrainHeight;
|
|
sampler2D _ShadowMap;
|
|
|
|
float2 getNeighborhoodUV(float3 worldPos) {
|
|
return float2(worldPos.x / (_TerrainWidth * 10), worldPos.z / (_TerrainHeight * 10));
|
|
}
|
|
|
|
float getNeighborhoodShade(float3 worldPos) {
|
|
return tex2D(_ShadowMap, getNeighborhoodUV(worldPos));
|
|
} |