mirror of
https://github.com/celisej567/cool-source-archive.git
synced 2026-01-04 14:11:16 +03:00
37 lines
1002 B
Plaintext
37 lines
1002 B
Plaintext
// HDRFIXME: Make this work with nonHDR
|
|
// DYNAMIC: "WRITE_DEPTH_TO_DESTALPHA" "0..1"
|
|
|
|
#include "common_ps_fxc.h"
|
|
#include "common_cbuffers_fxc.h"
|
|
CBUFFER_PERFRAME(register(b0))
|
|
|
|
Texture2D BaseTexture : register( t0 );
|
|
sampler BaseTextureSampler : register( s0 );
|
|
|
|
#include "common_sky_fxc.h"
|
|
|
|
cbuffer Sky_CBuffer : register( b1 )
|
|
{
|
|
Sky_t cSky;
|
|
};
|
|
|
|
struct PS_INPUT
|
|
{
|
|
float4 projPos : SV_POSITION;
|
|
float2 baseTexCoord : TEXCOORD0;
|
|
float2 baseTexCoord01 : TEXCOORD1;
|
|
float2 baseTexCoord10 : TEXCOORD2;
|
|
float2 baseTexCoord11 : TEXCOORD3;
|
|
float2 baseTexCoord_In_Pixels: TEXCOORD4;
|
|
};
|
|
|
|
float4 main( PS_INPUT i ) : SV_TARGET
|
|
{
|
|
float4 color = BaseTexture.Sample( BaseTextureSampler, i.baseTexCoord.xy );
|
|
color.rgb *= cSky.InputScale.rgb;
|
|
|
|
// This is never fogged.
|
|
return FinalOutput( color, 0, PIXEL_FOG_TYPE_NONE, float4(0, 0, 0, 1),
|
|
TONEMAP_SCALE_LINEAR, cToneMappingScale, WRITE_DEPTH_TO_DESTALPHA, 1e20 ); //when writing depth to dest alpha, write a value guaranteed to saturate
|
|
}
|