Draw floor of windows
This commit is contained in:
@@ -13,8 +13,8 @@ float isLHS (vec2 startV, vec2 testV)
|
|||||||
{
|
{
|
||||||
return sign( -startV.x * testV.y + startV.y * testV.x);
|
return sign( -startV.x * testV.y + startV.y * testV.x);
|
||||||
}
|
}
|
||||||
vec4 shiftUp (vec4 v)
|
vec4 shiftCloser (vec4 v)
|
||||||
{ return vec4 (v.xy , v.z-0.1 , v.w) ; }
|
{ return vec4 (v.xy , v.z-0.0001 , v.w) ; }
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
@@ -31,10 +31,10 @@ if (isLHS (p1.xy - lightPos, p2.xy - lightPos) < 0)
|
|||||||
vec2 d1 = p1.xy - lightPos;
|
vec2 d1 = p1.xy - lightPos;
|
||||||
vec2 d2 = p2.xy - lightPos;
|
vec2 d2 = p2.xy - lightPos;
|
||||||
|
|
||||||
vec4 a1 = shiftUp( perpMat * p1 );
|
vec4 a1 = shiftCloser( perpMat * p1 );
|
||||||
vec4 a2 = shiftUp( perpMat * p2 );
|
vec4 a2 = shiftCloser( perpMat * p2 );
|
||||||
vec4 a3 = shiftUp( perpMat * p3 );
|
vec4 a3 = shiftCloser( perpMat * p3 );
|
||||||
vec4 a4 = shiftUp( perpMat * p4 );
|
vec4 a4 = shiftCloser( perpMat * p4 );
|
||||||
|
|
||||||
dField = vec3( d1.x/rad, d1.y/rad, 0);
|
dField = vec3( d1.x/rad, d1.y/rad, 0);
|
||||||
gl_Position = a1;
|
gl_Position = a1;
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ lev1 = do
|
|||||||
(
|
(
|
||||||
[return $ return $ Right deadEndRoom
|
[return $ return $ Right deadEndRoom
|
||||||
]
|
]
|
||||||
++ [slowDoorRoom]
|
++ [roomMiniIntro]
|
||||||
++ [return $ connectRoom corridor
|
++ [return $ connectRoom corridor
|
||||||
,return $ connectRoom door]
|
,return $ connectRoom door]
|
||||||
++ firstWeapon
|
++ firstWeapon
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ worldPictures w
|
|||||||
, ptPicts'
|
, ptPicts'
|
||||||
, afterPtPicts'
|
, afterPtPicts'
|
||||||
, wlPicts'
|
, wlPicts'
|
||||||
|
, wlPicts
|
||||||
-- , wallShadows
|
-- , wallShadows
|
||||||
, smokeShadows
|
, smokeShadows
|
||||||
-- , itLabels
|
-- , itLabels
|
||||||
@@ -337,7 +338,8 @@ drawWall' w wall
|
|||||||
f (bpa,bpb) = intersectSegLineFrom' bpa bpb x (head p's)
|
f (bpa,bpb) = intersectSegLineFrom' bpa bpb x (head p's)
|
||||||
f' (bpa,bpb) = intersectSegLineFrom' bpa bpb y (last p's)
|
f' (bpa,bpb) = intersectSegLineFrom' bpa bpb y (last p's)
|
||||||
points = orderPolygon (borderps ++ ps)
|
points = orderPolygon (borderps ++ ps)
|
||||||
--points = orderPolygon (borderps ++ p's)
|
wallBase | _wlIsSeeThrough wall = polygon $ _wlLine wall
|
||||||
|
| otherwise = blank
|
||||||
|
|
||||||
drawWallShadow :: World -> Wall -> Drawing
|
drawWallShadow :: World -> Wall -> Drawing
|
||||||
drawWallShadow w wall
|
drawWallShadow w wall
|
||||||
|
|||||||
Reference in New Issue
Block a user