blob: d8fcff8204b2e7d1f61bce7209a00557a3ea4961 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "shaderCommon.h"
cbuffer constBuf : register(b0)
{
PointShaderConst gParams;
};
void pointShadowPS(PointGeoOut input)
{
// calculate normal from texture coordinates
float2 normal = input.texCoord.xy - float2(0.5, 0.5);
float mag = dot(normal.xy, normal.xy);
if (mag > 0.5 * 0.5)
{
discard; // kill pixels outside circle
}
}
|