View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006490 | The Dark Mod | Graphics | public | 17.02.2024 19:36 | 07.03.2024 20:18 |
Reporter | wellingtoncrab | Assigned To | stgatilov | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | PC | OS | Windows | OS Version | 11 |
Product Version | TDM 2.12 | ||||
Target Version | TDM 2.13 | Fixed in Version | TDM 2.13 | ||
Summary | 0006490: Incorrect Specular Response on Translucent Materials in Stencil Shadows Implementation | ||||
Description | When using the stencil shadows implementation, the specular channel on translucent materials such as water seem to respond as if geometry in the lights path are non shadow casting. Maps: http://tinyurl.com/5fzwn9st Stencil: http://tinyurl.com/245sts3x Occurs in 2.11 as well as current 2.12 beta. Occurs across entities and worldspawn regardless of light radius or material. Does not occur with opaque materials. See attached test map. | ||||
Steps To Reproduce | -Install test_specularstencilbug.pk4 -load test_specular.map -Toggle game settings between maps and stencil shadow implementations | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Copied from external conversation: I think there should be some shadow response but specular also shouldn't cutoff right on the shadow edge. I think the correct thing to do is reduce the specular response in the shadow region rather than stopping it completely |
|
Yep, looking at literature specular or reflections will produce glancing illumination regardless of occlusion due to the reflection angle but the shadow will partially attenuate the reflection. |
|
Translucent objects cannot have stencil shadows cast on them. They compute shadows in screen space once per light, so they can only compute them at solid objects. To support translucent objects, one would have to recompute all shadows individually for each translucent object. As for shadow maps, they support translucent object by some kind of bug/accident. Here is the code inside InteractionStage which disables soft shadows for translucent objects: if ( !translucent && ( vLight->globalShadows || vLight->localShadows ) && !viewDef->IsLightGem() ) { uniforms->softShadowsQuality.Set( r_softShadowsQuality.GetInteger() ); } else { uniforms->softShadowsQuality.Set( 0 ); } In case of stencil shadows, stencil test is used in non-soft case, which is basically disabled just before rendering translucents: qglStencilFunc( GL_ALWAYS, 128, 255 ); But in case of shadow maps, the shadow map still gets attached to the shader and thus takes effect (in hard code). Now the logical resolution to this situation would be to put shadows on translucents under cvar in case of shadow map, thus making default behavior consistent between two modes. |
|
Committed in svn rev 10647. I guess yet another reason to improve shadow maps in the future... sigh. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
17.02.2024 19:36 | wellingtoncrab | New Issue | |
17.02.2024 19:36 | wellingtoncrab | File Added: test_specularstencilbug.pk4 | |
17.02.2024 21:49 | nbohr1more | Note Added: 0016525 | |
17.02.2024 22:08 | nbohr1more | Note Added: 0016526 | |
18.02.2024 10:43 | stgatilov | Note Added: 0016529 | |
18.02.2024 10:55 | stgatilov | Note Added: 0016530 | |
20.02.2024 18:22 | nbohr1more | Assigned To | => stgatilov |
20.02.2024 18:22 | nbohr1more | Status | new => feedback |
24.02.2024 10:16 | stgatilov | Status | feedback => assigned |
24.02.2024 10:16 | stgatilov | Target Version | TDM 2.12 => TDM 2.13 |
07.03.2024 20:18 | stgatilov | Status | assigned => resolved |
07.03.2024 20:18 | stgatilov | Resolution | open => fixed |
07.03.2024 20:18 | stgatilov | Fixed in Version | => TDM 2.13 |