星域杂工jn_xyp 发表于 2020-7-20 01:23:27

[前置] GraphicsLib


下载 GraphicsLib 1.9.0
(0.97a 用)
(0.96a 用)(0.95.1a 用)
(0.95a 用) (0.9.1a 用)
曾用名:ShaderLib
依赖 LazyLib 2.8

编辑 GRAPHICS_OPTIONS.ini 来启用或关闭 GraphicsLib 功能。



我们推荐使用 版本检查器 来接收更新提示。

警告:请确保使用独立显卡运行远行星号游戏!
已知在某些移动和集成显卡上会产生严重的图像拖影问题!

警告:当Mod启用时必须关闭抗锯齿!点这看怎么关

有其他问题?请参见本指南


这是什么东西?
GraphicsLib Mod 提供了一系列游戏图形方面的改进,包括各种各样的视效插件,动态光照引擎,以及屏幕扭曲效果滤镜。通过使用本Mod提供的内置照明,变形和后期处理API,其他Mod也可以实现独特的滤镜效果。

功能

[*]动态照明
[*]扭曲滤镜
[*]后期处理滤镜
[*]图形增强插件:

[*]舰船停机效果增强
[*]舰船损坏烟雾效果
[*]过载电弧
[*]军官标识
[*]导弹自毁
[*]Modding API


屏幕截图





使用方法
对于玩家:只需要下载并启用即可,无需额外操作,开箱即用。如果您的电脑性能不足以使用 GraphicsLib,请参见本指南。

对于Modder:如果您想要在您的Mod中集成 GraphicsLib,请遵循以下步骤:

Use the following mod detection code in your ModPlugin class.If you want to make calls to GraphicsLib functions or use GraphicsLib objects, you must first check to see that hasGraphicsLib is true before calling/referencing them!Note that some scenarios may make this arrangement difficult, requiring GraphicsLib for resolving class links.Note that "shaderLib" is intentional here; the mod ID has remained the same to ensure backwards-compatibility.

public static boolean hasGraphicsLib;

@Override
public void onApplicationLoad() {
    hasGraphicsLib = Global.getSettings().getModManager().isModEnabled("shaderLib");

    if (hasGraphicsLib) {
      ShaderLib.init();
      LightData.readLightDataCSV("data/lights/your_light_data.csv");
      TextureData.readTextureDataCSV("data/lights/your_texture_data.csv");
    }
}

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.Remember that the material map must have an alpha channel that matches the original sprite's alpha channel.For implementation, see the example in GraphicsLib.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 properly, but the results can be well worth it.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.However, if you want an easy way out, an adequate normal map can be generated automatically through Photoshop, Crazy Bump, or similar programs, which takes far less time than making a normal map from the ground up.Remember that the normal map must have an alpha channel that matches the original sprite's alpha channel.For implementation, see the example in GraphicsLib.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.

Surface Map: This texture is completely optional (even more so than the other two).Surface maps enhance the normal map of the object by influencing how the specularity looks.The red channel corresponds to luminosity and will cause the ship to appear to glow wherever the red channel is nonzero.The green channel determines the specular intensity of the object; a value of zero is totally matte while a high value will be very shiny.The blue channel determines specular hardness, so a value of zero is cartoonishly shiny while a high value is very glossy; a value of 0.2 (or 51 on the integer scale) corresponds to the default behavior.Remember that the surface map must have an alpha channel that matches the original sprite's alpha channel.If a sprite lacks a surface map, the lighting engine will substitute red = 0, green = (derived from material map), blue = 0.2.


警告
你通常需要一款制造于2008年及以后的显卡来为本Mod提供合理的性能支持。虽然具体表现可能有所不同,但一张 GTX 460 及以上的显卡就可以在默认配置下流畅地运行本Mod。而且通过调整相关设置,几乎所有兼容的显卡都可以正常运行。已知某些移动和集成显卡与 GraphicsLib 不兼容。所以,如果您在使用移动版或集成显卡,请禁用变形和后期处理!

更新日志

Version 1.8.0 (January 7, 2024)
- Updated for Starsector 0.96a RC10
- No more '!!!'
- Adjusted/fixed behavior of dead ships regarding surface maps
- Added 'optimizeNormals' option to the settings for slightly better performance in some situations
- API expansion for RippleDistortion and WaveDistortion
- A default white directional sun-light is now visible in non-campaign battles (simulator, missions)
- Various private variables in RippleDistortion, WaveDistortion, and StandardLight changed to protected
- Improved performance of ship chunks (vanilla tessellation issue solved via caching)
- Added "shaderlib_do_not_render" custom data key, which applies to anything that has custom data, to completely ignore that entity for lighting purposes (improves performance, especially for ships)

Version 1.7.0 (May 9, 2023):
- Updated for Starsector 0.96a
- Added new option in settings: "enableFullExplosionEffects"
* Disabled by default because the vanilla game handles this part now
- Added new spreadsheet: data/config/glib/no_shield_ripple.csv
* Prevents shield ripples from being generated by the listed projectiles
- Added support for fighter skin texture maps
* List them in the texture data the same way they're listed in settings.json
* e.g., "xyphos_LOW_TECH"
- Trigonometry fixes
- Proximity fuse "hit" lights now work properly
* GraphicsLib will replace the original ProximityExplosionEffect (if any) with a custom ProximityExplosionEffect
* This custom ProximityExplosionEffect first instantiates and calls the original one, then adds the appropriate lights
- Fixed serious issue where some proximity fuse weapons would prematurely disappear
- Updated the options in the Preset Options folder to include a Low VRAM Compatibility mode
* When using this preset, nearly all features requiring extra video memory are disabled
* Use this if you have weirdly low FPS and heavy stuttering during combat

Version 1.6.1 (January 5, 2022):
- Fixed arc attenuation for distortion effects
- Updated for Starsector 0.95.1a RC6

Version 1.6.0 (December 12, 2021):
- Updated for Starsector 0.95.1a

Version 1.5.1 (March 30, 2021):
- Made sun-generated lights less extreme when multiple stars are in system
- Insignia icons are scaled to the new range of officer levels
* Tier 1: Level 1-2 (freshly hired officers)
* Tier 2: Level 3-4
* Tier 3: Level 5-6 (max for trainable/mercenary/NPC officers)
* Tier 4: Level 7+ (max for procgen officers, NPC commanders, and AI or unique officers)
- Added "aaCompatMode" to GRAPHICS_OPTIONS.ini
* Prevents GraphicsLib from crashing out at the start if you have antialiasing enabled
* Disables the second pass of the post processing shader
* You'll have antialiased sharpness in the campaign and the combat interface, but the actual in-battle ships/weapons/effects will be as blurry as if you weren't using antialiasing

Version 1.5.0 (March 29, 2021):
- Updated for Starsector 0.95a
- Now works with screen scaling
* Mod-added custom shaders will almost certainly need modification to work with screen scaling
- DOES NOT WORK with antialiasing
* GraphicsLib will crash out with a message asking you to either disable shaders OR disable antialiasing
* This is not a temporary measure; going forward, GraphicsLib and antialiasing don't mix
* 4K monitor users should use 200% screen scaling (antialiasing off)
    - 5K users should use 200% scaling and 4K resolution, fullscreen-upscaled to native monitor resolution (You won't lose that much quality)
* 1080p monitor users should use 100% screen scaling (antialiasing off)
* 1440p monitor users potentially have a tough choice
    - 100% scaling will work if the monitor is large enough (or if you have glasses)
    - Upscaling 1080p to fullscreen native resolution might look passable (depending on your monitor and video driver) but you'll definitely lose some quality
    - Otherwise, consider disabling shaders if you can't read the text
    - I personally use a 1440p monitor and can play fine at 100% scaling, but your mileage may vary
- Added shader maps for new vanilla content
- Added lights definitions for new vanilla content
- Ship explosions no longer create cinematic anamorphic flares

Version 1.4.5 (March 10, 2021):
- Slot cover normal map fix
- Fixed compile error with one of the normal map shaders on certain Radeon drivers

Version 1.4.4 (December 25, 2020):
- Possible surface map transparency fix?
- Fixed version file HTTPS redirect
- Overload EMP colors now match the default overlay (or any special overload colors that might be scripted in)
* Added "useVentColorsForOverloadArcs" option for old behavior

Version 1.4.3 (September 28, 2020):
- Fixed the Benchmark progress indicator
- Fixed normal map scaling when flipped
- Migrated version file to custom host (sigh)

Version 1.4.2 (July 8, 2020):
- Added global function suppressEffects() to ShipDestructionEffects to suppress spawning effects for a particular ship
- Migrated version file to BitBucket

Version 1.4.1 (September 8, 2019):
- Render order fix for layered modules

Version 1.4.0 (May 17, 2019):
- Updated for Starsector 0.9.1a
- Added shader maps for new Starsector 0.9.1a sprites
- Support for alternative ship textures
- Minor fix for light fade-in logic
- Minor fix for automatic distortion fade-out logic
- Render order update

Version 1.3.1 (February 15, 2019):
- Fixed lighting for plasma burn system
- Rendering order fix for lighting

Version 1.3.0 (November 17, 2018):
- Added a bunch of shader maps for new/updated Starsector 0.9a sprites
- Updated lighting settings where applicable for new/updated Starsector 0.9a content
- Fixed rendering order for station modules
- Added lighting support for mine explosions
- Works in Starsector 0.9a

Version 1.2.1 (June 10, 2017)
- Improved various effects for certain edge cases with sprites that are significantly smaller than the collision radius

Version 1.2.0 (June 4, 2017)
- Now works on Starsector 0.8.1a
- Additional LazyLib check
- Fixed some misc. bugs that nobody noticed
- Tweaked ship destruction effects for ship pieces to avoid fx spam
- Updated even more sprites

Version 1.1.0 (April 23, 2017)
- Now works on Starsector 0.8a
- Supports lighting on destroyed ship pieces
- New maps for the new ships/weapons, and updated maps for a large number of existing ships/weapons

Version 1.0.4 (March 26, 2017)
- Adjusted ripple intensity for ship deaths
- Disable bloom automatically on Intel IGPs

Version 1.0.3 (January 8, 2017)
- Nvidia post processing bug is fixed

Version 1.0.2 (May 21, 2016)
- General compatibility update

Version 1.0.1 (April 22, 2016)
- Added sun/hyperspace lighting from SS+

Version 1.0.0 (April 15, 2016)
- Renamed GraphicsLib
- shaderSettings.json renamed to GRAPHICS_OPTIONS.ini
- Added graphical effects plugins previously in Starsector+
- Added data/config/no_self_destruct.csv in case you want your mod-added missiles to not explode automatically


星域杂工jn_xyp 发表于 2021-11-8 12:40:31

独影指挥官 发表于 2021-11-6 13:36
萌新大叔求问,如何关闭 抗锯齿?


已玄1233 发表于 2020-7-20 07:44:49

肯定也要顶的

星域杂工jn_xyp 发表于 2020-7-20 08:24:30

本转载已取得Mod作者授权。

神威昂 发表于 2020-7-22 21:24:18

感谢分享~

lin224 发表于 2020-10-21 17:47:35

大佬感谢分享!

DNP 发表于 2020-11-24 21:59:18

666

hehe_kk 发表于 2021-1-14 19:04:40

多谢楼主分享

弗拉格 发表于 2021-2-9 16:09:10

{:5_127:}

黑星佣兵团 发表于 2021-2-23 22:53:30

666

殇羽 发表于 2021-3-9 18:04:34

谢谢分享

将军战列舰 发表于 2021-3-30 08:38:57

报错了

滚滚 发表于 2021-4-7 19:20:53

感谢分享

陈曦 发表于 2021-5-4 21:04:34

感谢楼主的分享

skjungjun 发表于 2021-6-24 14:49:17

我把mod放进文件夹了为什么在MOD管理那一栏看不到?{:tieba_30:}

PinYinNoob 发表于 2021-7-5 22:58:32

太感谢了

billgate 发表于 2021-7-25 19:15:31

感谢

浅夏乄 发表于 2021-7-28 13:49:41

谢谢楼主分享好人一生平安

星王 发表于 2021-8-31 18:03:07

感谢分享!

感冬 发表于 2021-10-17 08:08:30

感谢大佬搬运~

独影指挥官 发表于 2021-11-6 13:36:00

萌新大叔求问,如何关闭 抗锯齿?{:tieba_01:}

独影指挥官 发表于 2021-11-8 16:59:31

星域杂工jn_xyp 发表于 2021-11-8 12:40


万分感谢!

pygrads 发表于 2021-11-28 17:36:43

星域杂工jn_xyp 发表于 2021-11-8 12:40


我这里为什么没有选项?

星域杂工jn_xyp 发表于 2021-11-28 17:43:08

pygrads 发表于 2021-11-28 17:36
我这里为什么没有选项?

0.95及以上版本才会有这个选项,如果没有则无需设置

pygrads 发表于 2021-11-28 17:49:32

星域杂工jn_xyp 发表于 2021-11-28 17:43
0.95及以上版本才会有这个选项,如果没有则无需设置

谢谢

thelostpromise 发表于 2021-12-26 12:52:33

为什么我下载的0.95a用的GraphicsLib_1.5.1.7z ,下载完告诉我版本不对,我应该下载哪一个?

星域杂工jn_xyp 发表于 2021-12-27 01:04:18

thelostpromise 发表于 2021-12-26 12:52
为什么我下载的0.95a用的GraphicsLib_1.5.1.7z ,下载完告诉我版本不对,我应该下载哪一个? ...

这种只有后面RC小版本不一样的情况通常是可以运行的。
RC小版本一般只是用来修复游戏bug,mod可以直接兼容。mod作者不一定每个版本都要更新自己的mod。

1054245942 发表于 2022-1-26 00:33:27

本帖最后由 1054245942 于 2022-1-26 00:43 编辑


MK2378 发表于 2022-2-4 10:21:29

感谢您的分享

bandageshi 发表于 2022-2-13 16:55:28

951a版本报错,排查是这个mod的问题

终焉之曲 发表于 2022-2-15 19:38:11

将军战列舰 发表于 2021-3-30 08:38
报错了

我也是

终焉之曲 发表于 2022-2-15 19:38:45

bandageshi 发表于 2022-2-13 16:55
951a版本报错,排查是这个mod的问题

是啊关了这个mod就好了

终焉之曲 发表于 2022-2-15 19:47:31

我现在搞清楚了,这个前置mod必须要关闭抗锯齿才能运转,不然会直接给你把游戏崩了。

英仙座宅急送 发表于 2022-2-19 22:06:13

终焉之曲 发表于 2022-2-15 19:47
我现在搞清楚了,这个前置mod必须要关闭抗锯齿才能运转,不然会直接给你把游戏崩了。 ...

非常感谢,我一度以为是下错了前置版本{:5_124:}

174866667 发表于 2022-3-18 15:18:31

顶~~~~~~~~~

三等圆的大总统 发表于 2022-6-19 11:28:30


多谢分享

没技术,是菜鸡 发表于 2022-7-16 17:12:12

本帖最后由 没技术,是菜鸡 于 2022-7-16 17:16 编辑

我将一部分GraphicsLib的报错文本翻译成了中文,并且重新打包成了jar,可以与您的这个前置mod进行整合吗?

改动:翻译了开着抗锯齿然后报错退出时的报错文本和加载纹理文件失败时的报错文本

菠萝吹雪 发表于 2022-7-24 12:39:46

本帖最后由 菠萝吹雪 于 2022-7-24 12:40 编辑

这个前置mod装上去就打不开游戏了,直接报错

菠萝吹雪 发表于 2022-7-24 12:41:41

菠萝吹雪 发表于 2022-7-24 12:39
这个前置mod装上去就打不开游戏了,直接报错

其他俩前置mod都能正常用

心态崩了的杆 发表于 2022-8-7 16:43:28

解压的时候会提示我iota_surface
omega_cruiser_surface
omega_destroyer1_surface
omega_frigate_left_surface
omega_frigate_right_surface
这几个PNG文件损坏或错误导致无法解压,然后游戏里勾选这个mod就会导致游戏崩溃,提示
该怎么办,求助

星域杂工jn_xyp 发表于 2022-8-7 22:16:54

心态崩了的杆 发表于 2022-8-7 16:43
解压的时候会提示我iota_surface
omega_cruiser_surface
omega_destroyer1_surface


似乎不是GraphicsLib本身的问题,建议参考
https://www.fossic.org/thread-2751-1-1.html
单独发帖求助

星域杂工jn_xyp 发表于 2022-8-7 22:18:16

没技术,是菜鸡 发表于 2022-7-16 17:12
我将一部分GraphicsLib的报错文本翻译成了中文,并且重新打包成了jar,可以与您的这个前置mod进行整合吗?
...

可以去取得作者同意后单独发一个汉化版贴,到时候会将您的帖子挂到导航上

tutudeyundao 发表于 2022-8-14 14:07:36

回来了

刘传业 发表于 2022-8-14 14:39:55

11

2294909719 发表于 2022-8-19 00:52:51

为什么我下的graphlib打开之后是下载远行星号的客户端呢

潜水喵 发表于 2022-9-8 09:42:20

xdm我这rc6不关抗锯齿会报错直接进不去,关了就能进了,感谢楼主{:tieba_19:}

雷诺 发表于 2022-9-18 21:19:16

感谢大佬分享

雪月逝 发表于 2022-11-15 13:37:15

奈斯奈斯

1276335832 发表于 2022-12-17 23:17:04

0.951的用不了,显示安装的是0.91a,三个都用过了,只有0.95的和0.91的,没有0.951的

Jogooooooo 发表于 2022-12-26 06:42:42

最新的LazyLib好像是给RC3,不是RC6的,我游戏一直因为这个报错
页: [1] 2
查看完整版本: [前置] GraphicsLib