Files
Totterynine 2773eae4d7 shaderapidx11
use -dxlevel 110 to use it
2021-09-22 18:56:56 +05:00

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
}