Jump to content

Disable shadows per light, per fragment?


SpiderPig
 Share

Recommended Posts

I guess if you sent the light's ID to a uniform declared in the lighting file, and modified the lighting code to skip that light, but it seems difficult. Why would you want to do this? You can disable shadows on a per-light basis already.

  • Thanks 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

It was thought for real-time recasting of terrain shadows.  Currently I disable all lighting for where there are shadows from the directional light.  But I'd like to disable the light only for the specific light source so I can get multiple shadows from multiple lights.  This way a point light could light up an area that is in shadow for a directional light.

  • Confused 1
Link to comment
Share on other sites

Is this the correct way to get the lights index?

auto light = CreateDirectionalLight(world);
light->GetIndex();

And would I compare that value to lightIndex here in PBR/Lighting.glsl?

lightIndex = ReadLightGridValue(uint(lightlistpos));

 

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.
Note: Your post will require moderator approval before it will be visible.

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

×
×
  • Create New...