Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
629 B

//========== Copyright (c) Valve Corporation, All rights reserved. ==========//
#include "common_ps_fxc.h"
sampler TexSampler : register( s0 );
struct PS_INPUT
{
float2 baseTexCoord : TEXCOORD0; // Base texture coordinate
float4 vColor : TEXCOORD1;
};
float4 main( PS_INPUT i ) : COLOR
{
// Read PC sRGB color without using the HW sRGB read
float4 vTextureColor = tex2D( TexSampler, i.baseTexCoord );
// Do a PC sRGB gamma->linear conversion
vTextureColor.rgb = SrgbGammaToLinear( vTextureColor.rgb );
float4 result;
result.rgb = vTextureColor.rgb * i.vColor.rgb;
result.a = i.vColor.a;
return result;
}