2014-01-08 07:01:59 +01:00
|
|
|
Texture2D Diffuse : register(t0);
|
|
|
|
Texture2D Specular : register(t1);
|
|
|
|
Texture2D Ambient : register(t2);
|
|
|
|
|
|
|
|
RWTexture2D<float4> Output;
|
|
|
|
|
2014-02-05 16:00:28 +01:00
|
|
|
#define AmbFactor 0.3f;
|
|
|
|
|
2014-01-08 07:01:59 +01:00
|
|
|
[numthreads(16, 16, 1)]
|
|
|
|
void main( uint3 DTid : SV_DispatchThreadID )
|
|
|
|
{
|
2014-02-05 16:00:28 +01:00
|
|
|
float4 Light = Diffuse[DTid.xy] + Specular[DTid.xy];
|
2014-02-07 08:34:01 +01:00
|
|
|
float4 Amb = float4(Ambient[DTid.xy/2].xyz,1);// * Ambient[DTid.xy/2].w,1);
|
2014-02-05 16:00:28 +01:00
|
|
|
//Output[DTid.xy] = float4(Ambient[DTid.xy/2].xyz /* * Ambient[DTid.xy/2].w */, 1);
|
2014-01-22 16:31:33 +01:00
|
|
|
//Output[DTid.xy] = Diffuse[DTid.xy] + Specular[DTid.xy];
|
2014-02-07 15:52:07 +01:00
|
|
|
Output[DTid.xy] = Light + Amb * AmbFactor;
|
|
|
|
//Output[DTid.xy] = Ambient[DTid.xy/2].w;
|
2014-01-08 07:01:59 +01:00
|
|
|
}
|