add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
25
gamedata/shaders/r1/yuv2rgb.ps.hlsl
Normal file
25
gamedata/shaders/r1/yuv2rgb.ps.hlsl
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include "common.hlsli"
|
||||
|
||||
float4 main(float2 uv : TEXCOORD0) : COLOR
|
||||
{
|
||||
float3 YUV = tex2D(s_base, uv);
|
||||
|
||||
float Y = YUV.x;
|
||||
float U = YUV.y;
|
||||
float V = YUV.z;
|
||||
|
||||
/*
|
||||
float _T = 1.16406f*Y;
|
||||
float R1 = _T + 1.59765f*V - 0.86961f;
|
||||
float G1 = _T - 0.390625f*U - 0.8125f*V + 0.53076f;
|
||||
float B1 = _T + 2.01562f*U - 1.0786f;
|
||||
*/
|
||||
|
||||
float c = 1.16406f;
|
||||
float3 _Y = float3(c, c, c) * Y;
|
||||
float3 _U = float3(0.0f, -0.390625f, +2.01562f) * U;
|
||||
float3 _V = float3(+1.59765f, -0.8125f, 0.0f) * V;
|
||||
float3 _S = float3(-0.86961f, +0.53076f, -1.0786f);
|
||||
|
||||
return float4(_Y + _U + _V + _S, 1.0f);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue