Normal Maps / Depth Maps - Testers Needed! V1.0
Moderator: Moderators
Normal Maps / Depth Maps - Testers Needed! V1.0
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.
Last edited by Argh on 07 Jul 2009, 01:10, edited 9 times in total.
Re: Normal Maps / Depth Maps - Testers Needed!
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
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!
8800GT, crashes after countdown.
zipped - http://pastebin.com/m68b8c67f
sdd - http://pastebin.com/m4c4ca3ac
zipped - http://pastebin.com/m68b8c67f
sdd - http://pastebin.com/m4c4ca3ac
Re: Normal Maps / Depth Maps - Testers Needed!
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!
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.
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!
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
[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!
I'll see about fixing that in my lighting shader immediately.
Re: Normal Maps / Depth Maps - Testers Needed!
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.
Put the lighting shader in and active. I'll go look at Kloot's GLSL next.
Re: Normal Maps / Depth Maps - Testers Needed!
it works on geforce 2 but of course without fancy gfx.
at least it doesnt crash.
at least it doesnt crash.
- thesleepless
- Posts: 417
- Joined: 24 Oct 2007, 04:49
Re: Normal Maps / Depth Maps - Testers Needed!
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)
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!
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.
- thesleepless
- Posts: 417
- Joined: 24 Oct 2007, 04:49
Re: Normal Maps / Depth Maps - Testers Needed!
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)
sorry, would probably help if i enabled LuaShaders support in settings =p
looks great!
(although way too slow for my hardware)
Last edited by thesleepless on 03 Jul 2009, 03:09, edited 1 time in total.
Re: Normal Maps / Depth Maps - Testers Needed!
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)?
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
Really? How bad?(although way too slow for my hardware)
Those are high-poly spheres (about 8000 triangles for the both of them), so this is somewhat of a stress test anyhow.
- thesleepless
- Posts: 417
- Joined: 24 Oct 2007, 04:49
Re: Normal Maps / Depth Maps - Testers Needed! V0.3
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.
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
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
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:
I think they look pretty decent, nothing amazing. but normal map support like this will be cool.
pics: