Shadows and BuildingGroundDecal

Shadows and BuildingGroundDecal

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Shadows and BuildingGroundDecal

Post by Argh »

Turning shadows on changes their blending mode. Please fix that, it makes them "glow" when shadows are on, but look correct when shadows are off.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Shadows and BuildingGroundDecal

Post by Argh »

...and while I'm at it... please fix the clamping on those objects. It's not quite clamping correctly. I'll put up a screen here in a bit.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Shadows and BuildingGroundDecal

Post by Argh »

With shadows ON:
Image

With shadows OFF:
Image

It's pretty obvious what's wrong, if you look at the roads. The shadows OFF is using the correct blending method.


To see the problem with clamping, look closely at the join areas for these corner sections:
Image
You may need to click and zoom in to see it, but when zoomed you can clearly see that the texture is not being correctly clamped, and is one pixel off of where it should be. That one-pixel area is being shown on the opposite side of the decal area, and against lighter surfaces, it's totally obvious that it's wrong ;)

Setting up the clamping by defining max texture coordinate as 0.999999 and min as 0.000001 should do the trick, I've used that in Lua, where this problem also creeps up.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shadows and BuildingGroundDecal

Post by AF »

It looks like the roads are printed on shaped paper thats been folded up and theres a seem where they join
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shadows and BuildingGroundDecal

Post by AF »

Image

Just a clearer image
Attachments
arghZoomed.jpg
(127.29 KiB) Downloaded 129 times
Post Reply

Return to “Engine”