View topic - Normal Maps / Depth Maps - Testers Needed! V1.0



All times are UTC + 1 hour


Post new topic Reply to topic  [ 129 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
PostPosted: 02 Jul 2009, 23:51 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Image
Image
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, 00:10, edited 9 times in total.

Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 00:13 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Crashes on load, hardware info in the infolog:

http://pastebin.ca/1482419


Top
 Online Profile  
 
PostPosted: 03 Jul 2009, 00:20 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Hrmm. Great start :roll:

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 ;)


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 00:35 

Joined: 19 Apr 2005, 18:23
8800GT, works fine here:

Image


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 00:53 
Moderator
User avatar

Joined: 23 Nov 2005, 06:16
Location: Dunedin, New Zealand
8800GT, crashes after countdown.
zipped - http://pastebin.com/m68b8c67f
sdd - http://pastebin.com/m4c4ca3ac


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 00:53 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Problem was with running it through spring.exe, works fine through the lobby (was crashing after countdown/beofre comm spawn like bruce)


Top
 Online Profile  
 
PostPosted: 03 Jul 2009, 00:57 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
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.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:01 
Moderator

Joined: 22 Aug 2006, 15:19
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>


remove most consts, ati doesn't like them.

link to png, because i'm lazy: http://imgur.com/QRxwK.png


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:04 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
I'll see about fixing that in my lighting shader immediately.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:21 
Moderator
User avatar

Joined: 29 Apr 2005, 00:14
Location: #moddev - join it!
Image


Top
 Online Profile  
 
PostPosted: 03 Jul 2009, 01:32 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
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.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:40 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
it works on geforce 2 but of course without fancy gfx.
at least it doesnt crash.
Attachment:
titsonachessboard.jpg
titsonachessboard.jpg [ 164.37 KiB | Viewed 2240 times ]


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:47 
Modeler
User avatar

Joined: 24 Oct 2007, 03:49
Location: Sydney, Australia
Code:
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


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:50 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
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.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 01:58 
Modeler
User avatar

Joined: 24 Oct 2007, 03:49
Location: Sydney, Australia
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)


Last edited by thesleepless on 03 Jul 2009, 02:09, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 02:06 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
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)?


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 02:11 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
Quote:
(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.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 02:20 
Modeler
User avatar

Joined: 24 Oct 2007, 03:49
Location: Sydney, Australia
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.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 02:45 
P.U.R.E. Developer
User avatar

Joined: 21 Feb 2005, 03:38
Location: Herding cats uphill whilst wearing roller skates.
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.


Top
 Offline Profile  
 
PostPosted: 03 Jul 2009, 04:14 
Modeler
User avatar

Joined: 02 Sep 2006, 00:15
Location: ┬® Wolfe Games
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:

Image

Image

Image


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 129 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.