View Issue Details

IDProjectCategoryView StatusLast Update
0006004Spring engineLuapublic2018-10-12 01:23
ReporterSanguinario_Joe Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version104.0 +git 
Fixed in Version104.0 +git 
Summary0006004: Missing Uniforms in LUA map shaders
DescriptionWhen SetMapShader is used, spring is only setting 'texSquare' uniform variable. Indeed, the rest of uniforms and flags shall be set by the user. Unfortunately, several of them are hard, or even impossible, to set, like 'clipPlane'.

That's in fact blocking this awesome feature, right?

Probably, the easiest (but super-risky) solution is setting all the flags and uniforms, even in case of Lua Shaders
Additional InformationOfficially tested in Spring 104.0.1-966-g78324c9 develop, but probably is affecting every single version
Tagsgraphics, ground, luaui, map
Checked infolog.txt for Errors

Activities

gajop

2018-06-12 15:35

developer   ~0019211

Last edited: 2018-06-12 15:36

But, the whole point of Lua map shaders is that you could have custom shaders. Setting the same uniforms and flags that the engine shaders would limit them considerably.

We do need a map shader framework, something to hope for 105

lhog

2018-07-30 02:38

reporter   ~0019266

I agree @Sanguinario_Joe. Engine should set standard uniforms regardless of whether the shaders are standard or custom, otherwise SetMapShader is PITA to use.

@gajop, you can always define your own uniforms or choose not to use the standard ones.

gajop

2018-10-12 01:22

developer   ~0019388

Thanks to the @Sanguinario_Joe 's contribution this can now be done using the following code: https://github.com/sanguinariojoe/spring1944/blob/customMapShader/LuaUI/Widgets/gfx_customMapShader.lua
Please reopen if you think any other actions are necessary.

gajop

2018-10-12 01:23

developer   ~0019389

Fixed with https://github.com/spring/spring/pull/402

Issue History

Date Modified Username Field Change
2018-06-12 10:48 Sanguinario_Joe New Issue
2018-06-12 10:48 Sanguinario_Joe Tag Attached: graphics
2018-06-12 10:48 Sanguinario_Joe Tag Attached: ground
2018-06-12 10:48 Sanguinario_Joe Tag Attached: luaui
2018-06-12 10:48 Sanguinario_Joe Tag Attached: map
2018-06-12 15:35 gajop Note Added: 0019211
2018-06-12 15:36 gajop Note Edited: 0019211
2018-07-30 02:38 lhog Note Added: 0019266
2018-10-12 01:22 gajop Note Added: 0019388
2018-10-12 01:23 gajop Status new => closed
2018-10-12 01:23 gajop Resolution open => fixed
2018-10-12 01:23 gajop Fixed in Version => 104.0 +git
2018-10-12 01:23 gajop Note Added: 0019389