Page 1 of 7
Normal Maps / Depth Maps - Testers Needed! V1.0
Posted: 03 Jul 2009, 00:51
by Argh
Download Here.
This is a playable demo of normalmaps and depthmaps in Spring, using GLSL. It isn't a game, it's tech demo.
This has two GLSL shader implementations based on failure to compile, which, depending on whether you have nicer hardware than mine, you'll see one or the other. I don't have a switcher built yet, and probably won't bother, since this is just a tech demo.
The first is Kloot's code, as intended. The second, which just does normalmaps, and lacks self-shadows (I keep meaning to write a new shader just for that task, but I've been a little short on time) is my cut-down version, which is still a lot prettier than Spring's default ARB shader.
99% of the hard work and mental perspiration on this project was Kloot's. As you folks probably know, I did some early work on this topic, but Kloot got Spring working correctly with the features, and I've been waiting until P.U.R.E. calmed down a bit to finally get it in front of people. Since that doesn't seem to be happening and I'm still really busy... I decided that today I'd quit procrastinating and release this test for people to evaluate, and proceed from there.
I want testing results from folks. Screenshots and infologs- if it works, show us that it's working, and please let me know what hardware. If it breaks terribly, please let me know that, too, with infologs and screens.
This is a pretty important feature for Spring, in terms of looks, so the more testing that can be done, the better it'll get, and the better it gets, the better Spring games can look. Please help test this.
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 01:13
by FLOZi
Crashes on load, hardware info in the infolog:
http://pastebin.ca/1482419
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 01:20
by Argh
Hrmm. Great start
Try unzipping it to SDD, and deleting my lighting Gadget, just to make sure that that isn't the problem.
Trying to think if anything else could possibly causing it to just plain crash... I just tested with fresh ArchiveCache, and it's not a dependency issue or something silly like that, it still works just fine. Weird. I guess that's why we're testing

Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 01:35
by Sheekel
8800GT, works fine here:

Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 01:53
by Das Bruce
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 01:53
by FLOZi
Problem was with running it through spring.exe, works fine through the lobby (was crashing after countdown/beofre comm spawn like bruce)
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 01:57
by Argh
Bizarre.
So... it fails on countdown, but doesn't fail if you just go through the Lobby?
WTF? That's just plain weird. Probably isn't the Gadget's fault, then. Probably.
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:01
by imbaczek
ati 4850, most recent drivers
[code][ 0] GLSL Light Shader FailedVertex shader failed to compile with the following errors:
ERROR: 0:6: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type '3-component vector of float' and a right operand of type '4-component vector of float' (or there is no acceptable conversion)
ERROR: compilation errors. No code generated.
[ 0] Loaded gadget: GLSL Lighting <glsl_lighting.lua>
[ 0] [unit_normalmap_shader:Initialize] shader1 compilation failed
[ 0] Fragment shader failed to compile with the following errors:
WARNING: 0:26: '' : Built-in funtion 'Transpose' is not supported in implicit GLSL version number 110
ERROR: 0:33: '=' : assigning non-constant to 'const float'
ERROR: 0:85: 'assign' : cannot convert from 'const float' to '3-component vector of float'
ERROR: compilation errors. No code generated.
[ 0] [unit_normalmap_shader:Initialize] shader2 compilation failed
[ 0] Fragment shader failed to compile with the following errors:
WARNING: 0:28: '' : Built-in funtion 'Transpose' is not supported in implicit GLSL version number 110
ERROR: 0:62: 'assign' : cannot convert from 'const float' to '3-component vector of float'
ERROR: compilation errors. No code generated.
[ 0] Loaded gadget: unit_normalmap_shader_tst.lua <unit_normalmap_shader_gadget_sur.lua>
[/code]
remove most consts, ati doesn't like them.
link to png, because i'm lazy:
http://imgur.com/QRxwK.png
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:04
by Argh
I'll see about fixing that in my lighting shader immediately.
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:21
by FLOZi
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:32
by Argh
Version 2. Tried to fix the lighting shader by addressing the "inherent conversion" bug by making the operation explicit. Please re-download and test, imbazcek, I'd like to know if the lighting works on ATi finally.
Put the lighting shader in and active. I'll go look at Kloot's GLSL next.
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:40
by knorke
it works on geforce 2 but of course without fancy gfx.
at least it doesnt crash.

- titsonachessboard.jpg (164.37 KiB) Viewed 7260 times
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:47
by thesleepless
Code: Select all
Loaded gadget: unit_normalmap_shader_tst.lua <unit_normalmap_shader_gadget_sur.lua>
gf1 = LuaRules/Gadgets/glsl_lighting.lua
gf1 = LuaRules/Gadgets/unit_normalmap_shader_gadget_sur.lua
gf2 = LuaRules/Gadgets/glsl_lighting.lua
gf2 = LuaRules/Gadgets/unit_normalmap_shader_gadget_sur.lua
GLSL Light Shader Failed
Loaded gadget: GLSL Lighting <glsl_lighting.lua>
[unit_normalmap_shader:Initialize] no shader support
error = 2, LuaRules/draw.lua, error = 2, LuaGadgets/gadgets.lua, [string "LuaRules/Gadgets/unit_normalmap_shader_gadg..."]:601: attempt to call upvalue 'glDeleteShader' (a nil value)
SDL: 1.2.13
GL: 2.1.2 NVIDIA 173.14.19
GL: NVIDIA Corporation
GL: GeForce 6200/AGP/SSE2/3DNOW!
GLEW: 1.5.1
it claims "no shader support" but my card does have support for GLSL shaders and i've seen it do normal maps.
it doesn't crash however which is nice
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:50
by Argh
It looks like it compiled the GLSL for the lighting shader. Can you test whether that works, with the latest build? I'll see about removing that upvalue.
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 02:58
by thesleepless
seems it's a problem with gl.CreateShader not existing in spring, so i don't think it's actually a problem with your code.
sorry, would probably help if i enabled LuaShaders support in settings =p
looks great!
(although way too slow for my hardware)
Re: Normal Maps / Depth Maps - Testers Needed!
Posted: 03 Jul 2009, 03:06
by Argh
Have you enabled LuaShaders in SpringSettings?
Also... version 3 is up... I added disco lighting, for lulz.
Let's see... any ATi users seeing my lights now? Pretty please, you stupid drivers?
Maybe somebody who couldn't see normalmaps can now (fixed yet-another "implicit conversion" bug in the normalmap shader)?
Re: Normal Maps / Depth Maps - Testers Needed! V0.3
Posted: 03 Jul 2009, 03:11
by Argh
(although way too slow for my hardware)
Really? How bad?
Those are high-poly spheres (about 8000 triangles for the both of them), so this is somewhat of a stress test anyhow.
Re: Normal Maps / Depth Maps - Testers Needed! V0.3
Posted: 03 Jul 2009, 03:20
by thesleepless
with the unit off screen i get ~60fps, with it on screen i get ~30fps
with 14 of them i get ~12fps
so could be worse i guess. normal maps means you can get away with a lower polycount so for a game with a small amount of units it could be okay.
Re: Normal Maps / Depth Maps - Testers Needed! V0.3
Posted: 03 Jul 2009, 03:45
by Argh
14 of them is 96K triangles per pass. That's really not that terrible. Typical scene in P.U.R.E. is maybe half that.
Re: Normal Maps / Depth Maps - Testers Needed! V0.3
Posted: 03 Jul 2009, 05:14
by overkill
Ok, so i decided to give this a whirl. Seems to work ok performance wise. Got playable fps with 100 of them on screen, and my card is low end (9500gt)
I think they look pretty decent, nothing amazing. but normal map support like this will be cool.
pics:
