View Issue Details

IDProjectCategoryView StatusLast Update
0006245Spring engineGeneralpublic2019-07-14 21:35
Reporterlhog Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version104.0 +git 
Summary0006245: "shadow" lua materials
DescriptionI'm playing with CUS capabilities to supply custom "shadow" materials/shaders.

In particular the use of the GL.FRONT culling (during shadow pass) is looking good. With that kind of culling I was able to get rid of any z-biases (positive during the shadow pass or/and negative during the shadow mapping) and get excellent visual results without any shadow acne.

Apparently the engine expects GL_BACK culling to be there during the whole shadow pass: https://github.com/spring/spring/blob/maintenance/rts/Rendering/ShadowHandler.cpp#L381

With that two questions:
1. Is GL_BACK culling really good idea? For units and features GL.FRONT works just great
2. Is there a way to restore expected GL_BACK after I have completed shadow pass for custom "shadow" materials. (Clearly I don't want to do that individually after in post-DisplayList).

Because GL_BACK culling is not restored I get the terrain shadow artifacts like the one attached.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-07-14 18:50 lhog New Issue
2019-07-14 21:35 Kloot Status new => closed
2019-07-14 21:35 Kloot Resolution open => duplicate