fteqw/engine/shaders/hlsl9/defaultsky.hlsl
Spoike 0f7bbfcf0e Implement an area grid, primarily to avoid mods(read: xonotic) generating 2000 ents all sitting on the root area node.
Add separate cl_movement cvar to enable/disable reporting input sequences to DP servers (which use different pathways). Does not affect other protocols. This is separate from cl_nopred but will usually have the same result in the long run.
Fixed movevalues for DPP7 clients, if they try using prediction they should now (mostly) get the same values that DP normally uses for QW servers.
Reworked sky overrides somewhat. Now uses skyboxes where possible.
Fixed dpcompat_makeshitup a little, for better compat.
Fixed echo $foo$bar not exanding bar.
Try to fix the meanings of vid_hardwaregamma.
Fixes for builtins/features/etc that apparently only xonotic uses.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5143 fc73d0e0-1445-4013-8a0c-d673dee63da5
2017-08-29 02:29:06 +00:00

47 lines
No EOL
891 B
HLSL

struct a2v
{
float4 pos: POSITION;
};
struct v2f
{
#ifndef FRAGMENT_SHADER
float4 pos: POSITION;
#endif
float3 vpos: TEXCOORD0;
};
#ifdef VERTEX_SHADER
float4x4 m_modelviewprojection;
v2f main (a2v inp)
{
v2f outp;
outp.pos = mul(m_modelviewprojection, inp.pos);
outp.vpos = inp.pos;
return outp;
}
#endif
#ifdef FRAGMENT_SHADER
float e_time;
float3 e_eyepos;
sampler s_diffuse; /*diffuse*/
sampler s_fullbright; /*normal*/
float4 main (v2f inp) : COLOR0
{
float2 tccoord;
float3 dir = inp.vpos - e_eyepos;
dir.z *= 3.0;
dir.xy /= 0.5*length(dir);
tccoord = (dir.xy + e_time*0.03125);
float4 solid = tex2D(s_diffuse, tccoord);
tccoord = (dir.xy + e_time*0.0625);
float4 clouds = tex2D(s_fullbright, tccoord);
return float4((solid.rgb*(1.0-clouds.a)) + (clouds.a*clouds.rgb), 1);
}
#endif