Jump to content
The Dark Mod Forums

Material that is fullbright, but receives shadows as if it's standard ?


motorsep
 Share

Recommended Posts

Is it possible to have a fullbright material, which receives shadows as if it was standard material ?

 

For example, if I add stage with blend add to a standard material, it becomes fullbright, but then any shadow that is cast on it looks so faint, as if it's not even there.

 

Thanks.

Link to comment
Share on other sites

It sounds like you're doing the right thing, but you'll only see the shadows if the fullbright stage is very dull in colour.

 

Fulbright surfaces aren't affected by what light hits the surface. Shadows show up only where light doesn't hit. It sounds like you are looking for a compromise -- full brightness where light hits, but noting where it doesn't. The only way to do that would be with a different interaction shader.

 

It has to be an interaction shader, not just any old shader, because the shadow information will be available only while drawing light interactions. Unless you changed that with your soft shadow implementation.

 

The standard interaction shader tests whether a pixel is lit, then calculates the colour using surface normals, light direction, diffuse, specular and bump stages. You want a stripped-down version for your special surfaces that does the shadow test then just uses the texture colour as the output, ignoring all the other factors.

 

The only other thing you could try is toning down the brightness of your "blend add" stage -- say rgb 0.1 -- until the shadows show up.

Link to comment
Share on other sites

Yeah, this is probably within the province of a custom ARB or Cg shader (in your case) though it may be possible to use a few blend modes

to approximate a sorta threshold effect. "Blend Blend" is more reactive than "Blend Add" but obviously isn't fullbright when blended with a diffuse stage.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Hmm, blendLights can have forceShadows as I recall. You could use a spectrum material that is paired with blendLights at the same

spectrum. The problem being that you'd need to have one blendLight for every real light to make it look right which would be detrimental

to performance.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recent Status Updates

    • jaxa

      Embracer Group is Buying Square Enix Montréal, Eidos, and Crystal Dynamics for “Only” 300 Million USD: https://wccftech.com/embracer-group-square-enix-montreal-eidos-crystal-dynamics/
      · 1 reply
    • duzenko

      Do we want fur in TDM? Like https://duzenko.github.io/webgl/
      · 6 replies
    • Epifire

      Sometimes life throws a curveball - other times it straight up tries to take you outta the game. Been one thing after another lately but I ain't goin without a fight!
      · 2 replies
    • duzenko

      My Uber rating (as a passenger) is 4.71. Is there still hope or should I just kill myself? What's yours?
      · 3 replies
    • kano

      Did I mention how absolutely grateful I am that TDM didn't get (and can never be) assimilated by a huge company like Microsoft, as is what happened to Minecraft?
      · 3 replies
×
×
  • Create New...