mirror of
https://github.com/celisej567/cool-source-archive.git
synced 2026-09-15 20:09:19 +03:00
38 lines
977 B
Plaintext
38 lines
977 B
Plaintext
#include "common_ps_fxc.h"
|
|
#include "common_cbuffers_fxc.h"
|
|
|
|
CBUFFER_PERFRAME(register(b0))
|
|
CBUFFER_PERSCENE(register(b1))
|
|
|
|
/*cbuffer UnlitTwoTexture_CBuffer : register(b2)
|
|
{
|
|
UnlitTwoTexture_t c;
|
|
};*/
|
|
|
|
//#define g_DiffuseModulation c.cModulationColor
|
|
|
|
#define g_EyePos_SpecExponent cEyePos
|
|
|
|
Texture2D BaseTexture : register( t0 );
|
|
sampler BaseTextureSampler : register( s0 );
|
|
|
|
struct PS_INPUT
|
|
{
|
|
float4 projPos : SV_POSITION; // Projection-space position
|
|
HALF2 baseTexCoord : TEXCOORD0; // Base texture coordinate
|
|
float4 vertexColor : TEXCOORD1;
|
|
float3 eyeSpacePos : TEXCOORD2;
|
|
float3 normals : TEXCOORD3;
|
|
float4 worldPos_projPosZ : TEXCOORD7; // Necessary for water fog dest alpha
|
|
};
|
|
|
|
float4 main( PS_INPUT i ) : SV_TARGET
|
|
{
|
|
HALF4 baseColor = BaseTexture.Sample( BaseTextureSampler, i.baseTexCoord );
|
|
HALF4 result = baseColor.xyzw * i.vertexColor;
|
|
float alpha = baseColor.a * i.vertexColor.a;
|
|
|
|
return float4( result.rgb, alpha );
|
|
}
|
|
|