Skip to content

Commit 5812afa

Browse files
committed
- fight lighting and trees
1 parent b9799cc commit 5812afa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

DriverLevelTool/viewer/viewer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
" vec4 color = texture2D(s_texture, v_texcoord.xy);\n"\
3737
" if(color.r + color.g + color.b + color.a == 0.0f) discard;\n"\
3838
" lighting = vec4(color.rgb * u_ambientColor.rgb * u_ambientColor.a, color.a);\n"\
39-
" lighting.rgb += u_lightColor.rgb * u_lightColor.a * color.rgb * saturate(1.0 - dot(v_normal, u_lightDir));\n"\
39+
" lighting.rgb += u_lightColor.rgb * u_lightColor.a * color.rgb * max(1.0 - dot(v_normal, u_lightDir), 0);\n"\
4040
" fragColor = lighting;\n"\
4141
" }\n"
4242

@@ -168,8 +168,8 @@ struct WorldRenderProperties
168168

169169
void SetupLightingProperties(float ambientScale = 1.0f, float lightScale = 1.0f)
170170
{
171-
g_worldRenderProperties.ambientColor = ColorRGBA(0.95f, 0.9f, 1.0f, 0.45f) * ambientScale;
172-
g_worldRenderProperties.lightColor = ColorRGBA(1.0f, 1.0f, 1.0f, 0.55f) * lightScale;
171+
g_worldRenderProperties.ambientColor = ColorRGBA(0.95f, 0.9f, 1.0f, 0.45f * ambientScale) ;
172+
g_worldRenderProperties.lightColor = ColorRGBA(1.0f, 1.0f, 1.0f, 0.4f * lightScale);
173173
g_worldRenderProperties.lightDir = normalize(Vector3D(1, -0.5, 0));
174174
}
175175

@@ -299,7 +299,7 @@ void DrawLevelDriver2(const Vector3D& cameraPos)
299299
CELL_ITERATOR ci;
300300
PACKED_CELL_OBJECT* ppco;
301301

302-
int i = 441;// *32;
302+
int i = 441 * 16;
303303
int vloop = 0;
304304
int hloop = 0;
305305
int dir = 0;
@@ -362,7 +362,7 @@ void DrawLevelDriver2(const Vector3D& cameraPos)
362362

363363
if(model)
364364
{
365-
if(model->flags2 == MODEL_FLAG_TREE)
365+
if(model->shape_flags & SHAPE_FLAG_SMASH_SPRITE)
366366
{
367367
cellRotationRad = DEG2RAD(g_cameraAngles.y);
368368
}
@@ -511,7 +511,7 @@ void DrawLevelDriver1(const Vector3D& cameraPos)
511511

512512
if (model)
513513
{
514-
if (model->flags2 == MODEL_FLAG_TREE)
514+
if (model->shape_flags & SHAPE_FLAG_SMASH_SPRITE)
515515
{
516516
cellRotationRad = DEG2RAD(g_cameraAngles.y);
517517
}

0 commit comments

Comments
 (0)