View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0006098 | Spring engine | General | public | 2018-12-15 11:17 | 2018-12-15 13:54 | ||||
Reporter | lhog | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | tweak | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 104.0 +git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0006098: Shadow Texture sampling doesn't work in custom map shader | ||||||||
Description | From chat with hokomoko: I think I know what is wrong with shadows: 1) Lua Shaders cause this return: https://github.com/spring/spring/blob/maintenance/rts/Map/SMF/SMFRenderState.cpp#L484-L490 2) This is not executed: https://github.com/spring/spring/blob/maintenance/rts/Map/SMF/SMFRenderState.cpp#L512 3) Therefore these params are not set for texture: https://github.com/spring/spring/blob/16a88b7ee2f1c5f6e66bc7d07becd549573f1d17/rts/Rendering/ShadowHandler.cpp#L580-L587 Therefore I need to do something like this to render shadows: https://github.com/lhog/spring-map-pbr/commit/3301ae93c10c5d94e7d302cb0333b366e922d64b As a result shadows look a bit more jaggier, because textureProj(sampler2DShadow, coords)does PCF internally. Is there anything I can do from lua side to force GL_TEXTURE_COMPARE_MODE and the rest here https://github.com/spring/spring/blob/16a88b7ee2f1c5f6e66bc7d07becd549573f1d17/rts/Rendering/ShadowHandler.cpp#L580-L587 ? | ||||||||
Steps To Reproduce | Do custom map shader framework (or grab mine), that would set Flags and Uniforms 1) Copy standard SMF Map shader and load it as custom. 2) Observe correct rendering of everything except shadows. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Kloot (developer) 2018-12-15 13:54 |
Fix 858b876e70244ebda54dac02dc0633220ce22598 committed to develop branch: fix 0006098, repo: spring changeset id: 11202 |
Kloot (developer) 2018-12-15 13:54 |
Fix 286be00f9262fa5d63b3be70cf823ec0ec2122f1 committed to maintenance branch: fix 0006098, repo: spring changeset id: 11203 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2018-12-15 11:17 | lhog | New Issue | |
2018-12-15 13:54 | Kloot | Changeset attached | => spring develop 858b876e |
2018-12-15 13:54 | Kloot | Note Added: 0019608 | |
2018-12-15 13:54 | Kloot | Assigned To | => Kloot |
2018-12-15 13:54 | Kloot | Status | new => resolved |
2018-12-15 13:54 | Kloot | Resolution | open => fixed |
2018-12-15 13:54 | Kloot | Changeset attached | => spring maintenance 286be00f |
2018-12-15 13:54 | Kloot | Note Added: 0019609 |