Client: Fix for buildcubemaps
angles being overriden by some entity in the map or other.
This commit is contained in:
parent
8950666c69
commit
9e6d6ee7f1
3 changed files with 5 additions and 3 deletions
|
@ -113,9 +113,9 @@ varying mat3 invsurface;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* directional light */
|
/* directional light */
|
||||||
light = (e_light_mul * lambert(norm, e_light_dir)) * 2.0;
|
light += (e_light_mul * lambert(norm, e_light_dir)) * 2.0;
|
||||||
light += (e_light_ambient * lambert(norm, reflect(norm, e_light_dir))) * 0.5;
|
light += (e_light_ambient * lambert(norm, reflect(norm, e_light_dir))) * 0.5;
|
||||||
light *= 2.0;
|
light += (e_light_mul * dot(normal_f, e_light_dir));
|
||||||
|
|
||||||
#ifdef FAKESHADOWS
|
#ifdef FAKESHADOWS
|
||||||
diff_f.rgb *= ShadowmapFilter(s_shadowmap, vtexprojcoord);
|
diff_f.rgb *= ShadowmapFilter(s_shadowmap, vtexprojcoord);
|
||||||
|
|
|
@ -205,6 +205,7 @@ CSQC_UpdateView(float w, float h, float focus)
|
||||||
{
|
{
|
||||||
NSClient cl = __NULL__;
|
NSClient cl = __NULL__;
|
||||||
int s;
|
int s;
|
||||||
|
vector vecViewAngles = view_angles;
|
||||||
|
|
||||||
g_focus = (bool)focus;
|
g_focus = (bool)focus;
|
||||||
|
|
||||||
|
@ -260,7 +261,8 @@ CSQC_UpdateView(float w, float h, float focus)
|
||||||
setproperty(VF_MIN, [0,0]);
|
setproperty(VF_MIN, [0,0]);
|
||||||
setproperty(VF_VIEWENTITY, player_localentnum);
|
setproperty(VF_VIEWENTITY, player_localentnum);
|
||||||
setproperty(VF_ORIGIN, g_vecCubePos);
|
setproperty(VF_ORIGIN, g_vecCubePos);
|
||||||
setproperty(VF_ANGLES, [0,0,0]);
|
setproperty(VF_ANGLES, vecViewAngles);
|
||||||
|
setproperty(VF_CL_VIEWANGLES, vecViewAngles);
|
||||||
setproperty(VF_SIZE_X, g_dCubeSize);
|
setproperty(VF_SIZE_X, g_dCubeSize);
|
||||||
setproperty(VF_SIZE_Y, g_dCubeSize);
|
setproperty(VF_SIZE_Y, g_dCubeSize);
|
||||||
setproperty(VF_AFOV, 90.0f);
|
setproperty(VF_AFOV, 90.0f);
|
||||||
|
|
Loading…
Reference in a new issue