Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 6 7 [8] 9 10 ... 27

Author Topic: [0.7.2a] ShaderLib Beta 1.2.1b (Legacy)  (Read 238443 times)

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

Try this:

ShaderLib Alpha v1.23

Alpha v1.23 (May 23, 2014)
- Restructured internal rendering code
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

<tests>

Yay, that got it :)

Logged
Please check out my SS projects :)
Xeno's Mod Pack

DeathRay

  • Ensign
  • *
  • Posts: 40
    • View Profile

Is it normal that the Bloom is very GPU intensive or am I doing something wrong?

I have a GTX 670 and when the Bloom is enabled, my frames are often dropping down to 30, even in a two frigate fight.

After disabling the Bloom I can play at 60 fps with no problems.

All other configurations are standard.
Logged

Sabaton

  • Admiral
  • *****
  • Posts: 523
    • View Profile

You're not the only one with problems, every time something hits the shields and causes that ripple effect my FPS drop like a stone. :(
And I don't have a bad PC either.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

Bloom is fairly GPU intensive but shouldn't be causing a frame rate hit on your card.  And distortions are less intensive than lights, by far.

Sebaton, try setting "use64BitBuffer" to false and see if that improves your frame rate.

DeathRay, try disabling vsync.  It can cause you to drop from 59 fps to 30fps.
Logged

DeathRay

  • Ensign
  • *
  • Posts: 40
    • View Profile

Thanks, that seems to have solved the problem.
Didn't even know that this Option existed. o.O
Maybe something that should be put in an option Menu.
Or am I just blind and didn't saw it there?
Logged

Sabaton

  • Admiral
  • *****
  • Posts: 523
    • View Profile

try setting "use64BitBuffer" to false and see if that improves your frame rate.

 That hit the spot. Thanks a lot!
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

Minor thing caught in Vacuum thread: http://fractalsoftworks.com/forum/index.php?topic=4292.msg135072#msg135072

Oh, and I'll try out the 64-bit thing; haven't really had major performance issues but if it doesn't change the appearance much, it's probably the good default to use rather than the more-aggressive setting :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

It reduces aliasing on scenes with multiple distortions of varying size/shape/intensity.  Something you won't notice unless it's working improperly.  I went and redid the whole upload just to set the default to false, though, because ShaderLib has to work perfectly for everybody, no exceptions.

ShaderLib Alpha v1.24

Alpha v1.24 (May 24, 2014)
- Added an alternative low-memory animated ripple
- Decreased graphics memory usage, especially when shaders are disabled
- Fixed file naming standards
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile

I hear you on that.  It's always better to have the fancy stuff for power-users to tweak; the defaults should be safe, even if safe isn't perfectly pretty. 

99% of users won't really notice most of the high-end stuff anyhow; I saw very little observable difference in the bloom settings during practical playtesting, for example; the differences were subtle enough that they were only really observable if I compared screenshots :)

A quick thought.  It'd be fairly easy to write a Dialog system to turn options on / off with in-game, if ShaderLib could handle it from an internal perspective. 

I've been thinking about writing up such a thing for Vacuum, the only thing that stops me is dealing with language support issues on non-QWERTY keyboards.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

Most of the settings require initialization, in some cases major initialization.  Texture initialization stuff like bloom mips are possible to reinitialize between combat but things like enabling/disabling distortions are far more difficult to change without a restart.

The problem with custom dialogs for this is we basically have to make the entire functionality from scratch.  And it would only work from mid-campaign.  I'd rather have this stuff in the options menu.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia



Older Examples:
Spoiler


[close]

ShaderLib Alpha v1.3

Alpha v1.3 (May 26, 2014)
- Blinn-Phong lighting added to Lighting Engine for cases where a sprite uses a normal map (this feature is off by default and is intended for TC mods and a possible future where more sprites have normal maps)
- Added "enableNormal", "specularIntensity", "specularHardness", and "lightDepth" options to settings.json
- Rare NVIDIA fullscreen "ghosting" issue resolved
- Light data documentation added (in the data/lights folder)
- Custom material maps supported (to use, link a texture to the ship/weapon by adding a key to "graphics" in data/config/settings.json; see example in ShaderLib)
- Custom normal maps supported (to use, link a texture to the ship/weapon by adding a key to "graphics" in data/config/settings.json; see example in ShaderLib)
- Example normal and material maps added for Conquest, Onslaught, and Paragon (the normal maps were machine-generated)



This update adds support for Material Maps and Normal Maps for ship and weapon sprites.

Material Map: This texture determines the reflectivity of the sprite.  Internally, the lighting engine uses a minimum function (i.e. reflectivity = the darker of the pixel on screen and the corresponding pixel on the material map), so there are limitations on what you can do with a material map.  In general, you want to begin with the original ship sprite and then darken areas that should not reflect as much light.  You can also darken individual color channels to allow interesting effects like having reflected shines being a different color than the hull.  Also, the material map influences specularity if you are using normal maps; a brighter material will have a brighter shine.  Remember that the material map must have an alpha channel that matches the original sprite's alpha channel.  To link a material map to a ship/weapon, add a key under the "shipMaterial" or "weaponMaterial" category in the "graphics" section of data/config/settings.json.  The key name must match the id of the ship/weapon you are adding the material map for, appended with "_hardpoint" or "_turret".  Individual frames for animated weapons should be named as such: "weaponId_turret0", "weaponId_turret1", "weaponId_turret2", etc.  See the example in ShaderLib.  If a sprite lacks a material map, the default is the original sprite (i.e. identical to previous lighting versions).

Normal Map: This texture is difficult to make and is NOT RECOMMENDED FOR MOST MODS.  The effect gained by using normal maps is subtle and is typically a very large amount of work for a small amount of gain.  There are many tutorials for making normal maps elsewhere on the Internet, if you are interested in making them for vanilla sprites or your own ships.  Remember that the normal map must have an alpha channel that matches the original sprite's alpha channel.  To link a normal map to a ship/weapon, add a key under the "shipNormal" or "weaponNormal" category in the "graphics" section of data/config/settings.json.  The key name must match the id of the ship/weapon you are adding the normal map for, appended with "_hardpoint" or "_turret".  Individual frames for animated weapons should be named as such: "weaponId_turret0", "weaponId_turret1", "weaponId_turret2", etc.  See the example in ShaderLib.  If a sprite lacks a normal map, the lighting engine will default to using the old lighting model for that sprite rather than the new Blinn-Phong model.



Normal maps are NOT RECOMMENDED.  They are intended for total conversions and special occasions.  Make normal maps AT YOUR OWN RISK!

Normal maps are very time-consuming to make and they should absolutely NOT become the norm for Starsector mods.  ShaderLib is meant to enhance the user experience, not force modders to do significantly more work.  As such, normal maps are disabled by default and must be manually enabled in ShaderLib's settings.json.
« Last Edit: May 30, 2014, 12:26:35 AM by Dark.Revenant »
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: [Graphics] ShaderLib Graphics Enhancement Mod (Alpha v1.3)
« Reply #117 on: May 26, 2014, 08:50:44 PM »

Wow, I am impressed; I thought that was going to have to wait for Alex to make it a little easier :) 

On normal maps... only one major question atm; how is the Sun (main light source) defined?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [Graphics] ShaderLib Graphics Enhancement Mod (Alpha v1.3)
« Reply #118 on: May 26, 2014, 08:54:53 PM »

It's not.  The main light is built-in to the sprite.  Normals only affect point and line light calculations.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: [Graphics] ShaderLib Graphics Enhancement Mod (Alpha v1.3)
« Reply #119 on: May 26, 2014, 09:00:55 PM »

Ah.  So we just need to add a sun light vector to the shader then, if we want a non-overhead light source to do the major lighting, like in the WTF example. 

Are the material maps handled in the same shader? 

I apologize for asking stupid questions- I'll look at this later on and see what makes sense to mess with; I probably won't do anything serious with this, but I'm interested in messing with it for the fun of it and will probably want to do shader variants :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack
Pages: 1 ... 6 7 [8] 9 10 ... 27