add game&rawdata
This commit is contained in:
parent
0133cd976c
commit
49b34b5546
45731 changed files with 709831 additions and 0 deletions
59
gamedata/shaders/d3d11/model_pda_screen.ps.hlsl
Normal file
59
gamedata/shaders/d3d11/model_pda_screen.ps.hlsl
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
#include "common.hlsli"
|
||||
|
||||
uniform float4 m_affects;
|
||||
|
||||
struct v2p
|
||||
{
|
||||
float2 tc0: TEXCOORD0; // base
|
||||
float3 tc1: TEXCOORD1; // environment
|
||||
float4 c0: COLOR0; // sun.(fog*fog)
|
||||
};
|
||||
|
||||
float get_noise(float2 co)
|
||||
{
|
||||
return (frac(sin(dot(co.xy ,float2(12.9898,78.233))) * 43758.5453))*0.5;
|
||||
};
|
||||
|
||||
Texture2D s_vp2;
|
||||
Texture2D s_load;
|
||||
float4 problems_main( v2p I )
|
||||
{
|
||||
// óçêàÿ ïîëîñêà èñêàæåíèé
|
||||
float problems = frac( timers.z * 5*(1 + 2 * m_affects.x) );
|
||||
I.tc0.x+= ( m_affects.x > 0.09 && I.tc0.y > problems-0.01 && I.tc0.y < problems) ? sin((I.tc0.y-problems)*5*m_affects.y) : 0;
|
||||
|
||||
// øèðîêàÿ ïîëîñêà èñêàæåíèé
|
||||
problems = cos( ( frac( timers.z *2 ) - 0.5 ) * 3.1416 )*2 - 0.8;
|
||||
float AMPL = 0.13;
|
||||
I.tc0.x -= ( m_affects.x > 0.15 && I.tc0.y > problems-AMPL && I.tc0.y < problems+AMPL) ? cos(4.71*(I.tc0.y-problems)/AMPL) * sin( frac(timers.z)*6.2831*90 ) * 0.02 * (AMPL-abs(I.tc0.y-problems))/AMPL : 0;
|
||||
|
||||
// òðÿñêà âëåâî-âïðàâî â ôèíàëüíîé ñòàäèè
|
||||
I.tc0.x += ( m_affects.x > 0.38 ) ? (m_affects.y - 0.5) * 0.04 : 0;
|
||||
|
||||
float4 t_vp2 = (m_affects.x < 0.27) ? s_vp2.Sample ( smp_base, I.tc0) : s_base.Sample ( smp_base, I.tc0) ;
|
||||
|
||||
// Øóì ïðè âûáðîñå
|
||||
float noise = get_noise(I.tc0*timers.z) * m_affects.x * m_affects.x * 20;
|
||||
t_vp2.r += noise;
|
||||
t_vp2.g += noise;
|
||||
t_vp2.b += noise;
|
||||
|
||||
//îòêëþ÷åíèå ýêðàíà
|
||||
t_vp2.rgb = (m_affects.x > 0.41) ? 0 : t_vp2.rgb;
|
||||
|
||||
return float4 (t_vp2.r, t_vp2.g, t_vp2.b, 1);
|
||||
}
|
||||
|
||||
|
||||
float4 loading_main( v2p I )
|
||||
{
|
||||
float4 t_load = s_load.Sample ( smp_base, I.tc0);
|
||||
return float4 (t_load.r, t_load.g, t_load.b, 1);
|
||||
}
|
||||
|
||||
float4 main( v2p I ) : SV_Target
|
||||
{
|
||||
float4 t_base = (m_affects.a > 0 && m_affects.x >= 0.08 ) ? loading_main(I) : problems_main(I);
|
||||
t_base.xyz = detonemap(t_base.xyz);
|
||||
return t_base;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue