Jump to content

[1.3.1]TextureReplacerReplaced v0.5.4


HaArLiNsH

Recommended Posts

2 hours ago, Sigma88 said:

EDIT2:

I've added the loading times from my old version but with the start moved at "MainMenu.Awake"

there doesn't seem to be any loading issues so it's probably something that has to do with the shader code, I don't know how that works, and I don't even know if an higher loading time has to be expected so I defer further testing to @HaArLiNsH and @Ger_space
 that are certainly more familiar with the code :D

I haven't tested this version with any heavy installations (planet packs + kopernicus tend to be really heavy at the MainMenu.Awake and MainMenu.Start so it wouldn't surprise me if there were some issues there)

but I don't have time now to test that, so it will have to wait

I'll have a look what is going wrong there. The shader loader compiles all shaders at once, but this should not be not such an large issue. 1-2 seconds had been expected, but this is later on regained by a faster loading of the other scenes, where the shaders are used. Perhaps I messed something up, with one of my latest changes, but my reflective branch of TR didn't show this problem, so I'm a bit confised, what I have messed up.

Are you using OpenGL or DX9 or DX11?

 

Link to comment
Share on other sites

5 hours ago, Sigma88 said:

@HaArLiNsH

 

I've added the loading times from my old version but with the start moved at "MainMenu.Awake"

there doesn't seem to be any loading issues so it's probably something that has to do with the shader code, I don't know how that works, and I don't even know if an higher loading time has to be expected so I defer further testing to @HaArLiNsH and @Ger_space
 that are certainly more familiar with the code :D

I haven't tested this version with any heavy installations (planet packs + kopernicus tend to be really heavy at the MainMenu.Awake and MainMenu.Start so it wouldn't surprise me if there were some issues there)

but I don't have time now to test that, so it will have to wait

That's a nice test that really looks like the result I was referring to. And yeah this is at the black where there is no loading bar, I can see the progress in realtime because I have an external monitoring screen (RAM, GPU, fps, cpu, etc)

I don't know the shader stuff, @Ger_space is the shader expert :) That's why I let him do these changes as he seems to know a lot more than me on the subject.

I'm also learning about this MainMenu.Awake and MainMenu.Start :)

10 sec seems a bit long just to load the shaders

I tried a stress configuration,  the last master build + 2 copy of my TRR_SuitGuide (one in suits & one in default), each pack contains 55 .png at 4096x4096 (so we go to 110 .png )  and I got the nice windows freeze nice popup "would like to wait for the application to finish or shut it down". I waited and all loaded normally, so even if it takes time, it don't crash :)

edit (last response came wile I was typing)  :  I use DX11 I guess as I didn't configured this and I'm on win 10

 

 

And FYI, the master branch is clearly not ready, but as TR still works for the 1.3, we don't need to rush.

- I still need to fix my 3 states (log spamming an error because of my check system to see if we are at suborbital for the EVAground suit),

- we need to fix the veteran state,

- we need to finish the new shader system,

- I still need to look at the skybox and navball,

- we need to detach the folders suits,heads, skybox and so on from the TRR folder

- EDIT : the helmet collar removal is a dream that seems to be achievable too :wink:

I'm sure there are things I forgot :)

 

Edited by HaArLiNsH
Link to comment
Share on other sites

2 minutes ago, Ger_space said:

I'll have a look what is going wrong there. The shader loader compiles all shaders at once, but this should not be not such an large issue. 1-2 seconds had been expected, but this is later on regained by a faster loading of the other scenes, where the shaders are used. Perhaps I messed something up, with one of my latest changes, but my reflective branch of TR didn't show this problem, so I'm a bit confised, what I have messed up.

Are you using OpenGL or DX9 or DX11?

 

I was getting errors of missing shaders in the logs, one was called something like "KSP/TR/visor" or something like that

 

not sure about opengl and dx, I just run the game without any modifications on win10 so no opengl I would suppose

Link to comment
Share on other sites

Just now, Sigma88 said:

I was getting errors of missing shaders in the logs, one was called something like "KSP/TR/visor" or something like that

 

not sure about opengl and dx, I just run the game without any modifications on win10 so no opengl I would suppose

you can find these 2 files in the master branch

https://github.com/HaArLiNsH/TextureReplacerReplaced/tree/master/GameData/TextureReplacerReplaced/Shaders

@Ger_space : We only need these 2 files and get rid of the old ones ?

Link to comment
Share on other sites

2 minutes ago, Sigma88 said:

I was getting errors of missing shaders in the logs, one was called something like "KSP/TR/visor" or something like that

 

not sure about opengl and dx, I just run the game without any modifications on win10 so no opengl I would suppose

Then you use DX9.

Oh dear, when you have this error. then the shader is not loaded into your system. I'll check this later and report back. I don't know whats the current problem.

 

3 minutes ago, HaArLiNsH said:

you can find these 2 files in the master branch

https://github.com/HaArLiNsH/TextureReplacerReplaced/tree/master/GameData/TextureReplacerReplaced/Shaders

@Ger_space : We only need these 2 files and get rid of the old ones ?

yes this are the files.

Link to comment
Share on other sites

@HaArLiNsH I was using that folder, which means the code to get them could be wrong? not sure

the error was saying "KSP/TR/visor"  is that the correct name?

usually when KSP loads stuff (mainly images) from GameData the name is the location of the file, so an image stored in

KSP_INSTALL/GameData/MyMod/texture.png

would load with the name "MyMod/texture"

 

1 minute ago, Ger_space said:

Oh dear, when you have this error. then the shader is not loaded into your system. I'll check this later and report back. I don't know whats the current problem.

don't worry about this now, if you are still working on it it's probably best that you get it to work 100% on your system and then share what you have and see if it works. there's no point in testing something which is not ready yet (I was just curious to see if there was a delay, but it's probably caused by the fact that it's still an unfinished "product")

Link to comment
Share on other sites

1 minute ago, Sigma88 said:

@HaArLiNsH I was using that folder, which means the code to get them could be wrong? not sure

the error was saying "KSP/TR/visor"  is that the correct name?

usually when KSP loads stuff (mainly images) from GameData the name is the location of the file, so an image stored in

KSP_INSTALL/GameData/MyMod/texture.png

would load with the name "MyMod/texture"

 

it is the self-given identifier of the shader, so it is correct. It's not a path. (think of categories)

 

4 minutes ago, Sigma88 said:

@HaArLiNsH I was using that folder, which means the code to get them could be wrong? not sure

the error was saying "KSP/TR/visor"  is that the correct name?

usually when KSP loads stuff (mainly images) from GameData the name is the location of the file, so an image stored in

KSP_INSTALL/GameData/MyMod/texture.png

would load with the name "MyMod/texture"

 

could you please replace the reflective shader file with the one from my TR package? I might have messed that up.

Link to comment
Share on other sites

1 minute ago, Ger_space said:

it is the self-given identifier of the shader, so it is correct. It's not a path. (think of categories)

ok, then probably it's something more complicated than I thought :)

Link to comment
Share on other sites

20 minutes ago, Ger_space said:

could you please replace the reflective shader file with the one from my TR package? I might have messed that up.

The OpenGL.bundle and DirectX.bundle that we can find in the v0.2 release ? or the one before ?

 

edit : I've put back the opengL and directX in the master branch, I think there was a third but I can't find it :)

Edited by HaArLiNsH
Link to comment
Share on other sites

9 minutes ago, HaArLiNsH said:

The OpenGL.bundle and DirectX.bundle that we can find in the v0.2 release ? or the one before ?

 

edit : I've put back the opengL and directX in the master branch, I think there was a third but I can't find it :)

no, these files are not loaded anymore. I was talking about the TR_Reflective_something .ksp file from the TR thread. 

Link to comment
Share on other sites

10 minutes ago, Ger_space said:

no, these files are not loaded anymore. I was talking about the TR_Reflective_something .ksp file from the TR thread. 

this one ?

I have also a question ,I changed all the TextureReplacer to TextureReplacerReplaced except of course the TextureReplacer class name , but I still I have this one

foreach (UrlDir.UrlConfig file in GameDatabase.Instance.GetConfigs("TextureReplacer"))

at line 62 of TextureReplacer.cs on the master branch and I don't know if I can/need to change it or if it makes reference to the class itself

Edited by HaArLiNsH
Link to comment
Share on other sites

6 minutes ago, HaArLiNsH said:

this one ?

I have also a question ,I changed all the TextureReplacer to TextureReplacerReplaced except of course the TextureReplacer class name , but I still I have this one


foreach (UrlDir.UrlConfig file in GameDatabase.Instance.GetConfigs("TextureReplacer"))

at line 62 of TextureReplacer.cs on the master branch and I don't know if I can/need to change it or if it makes reference to the class itself

not this file. I'll test this later on my own. I'll also add some profiling stuff so I can see exactly where the time is wasted and what is going on. 

 

KSP API for Getconfigs  This is the identifier in the config files. you need to rewrite all config files. if you change this.

Edited by Ger_space
Link to comment
Share on other sites

10 minutes ago, Ger_space said:

not this file. I'll test this later on my own. I'll also add some profiling stuff so I can see exactly where the time is wasted and what is going on. 

Last try :)

this one ? tr_reflective_emissive_alpha.ksp for the your version 1.3b ? :) 

 

anyway, take your time, do your stuff on your side :)  I'm trying to fix the log spam I made, I 'm sure its stupid but you know .. :)

Edited by HaArLiNsH
Link to comment
Share on other sites

13 minutes ago, HaArLiNsH said:

Last try :)

this one ? tr_reflective_emissive_alpha.ksp for the your version 1.3b ? :) 

 

anyway, take your time, do your stuff on your side :)  I'm trying to fix the log spam I made, I 'm sure its stupid but you know .. :)

yes, this file. :wink:

No worries about log spamming. I it always good to know what the code does and at wich line it crashes. (now I need to get back to work)

Link to comment
Share on other sites

@Sigma88 & @HaArLiNsH

I'm able to reproduce the issues with the loading time. It occurs every time when you don't force KSP to run in DirectX11 mode (which I do by every time, because it is way faster)

 

DirectX9 (KSP default) 
$ grep TR output_log.txt  | grep Stop
TR: Stopwatch: "Shader" elapsed time: 00:00:05.3970199
TR: Stopwatch: "Awake" elapsed time: 00:00:05.4038874
TR: Stopwatch: "Start" elapsed time: 00:00:00.4092853


DirectX11 (KSP_x64.exe -force-d3d11)
$ grep TR output_log.txt  | grep Stop
TR: Stopwatch: "Shader" elapsed time: 00:00:00.5496092
TR: Stopwatch: "Awake" elapsed time: 00:00:00.5570853
TR: Stopwatch: "Start" elapsed time: 00:00:00.4115550

looks nearly the same except, that the decimal dot is at an other place, so DirectX11 warms up all shaders 10 times faster...

Link to comment
Share on other sites

@HaArLiNsH

you can delete the  following line from TextureReplacer.cs. The shaders also be loaded without it, so when I tested it first I might messed something up.

from: internal void LoadShaders()

Shader.WarmupAllShaders();

^^^^^^delete or comment this out this line ^^^^^^

I have messed up my local repository and I don't want to resync it for just one line

Edited by Ger_space
Link to comment
Share on other sites

11 minutes ago, Avera9eJoe said:

How soon do you think the reflection shader fixes will make it into the official release? I ask because if it's within the week I can update WindowShine before going on vacation :)

The code is already merged into the TRR master tree and I'll push in a few minutes a small update to the shader files itself.

Old reflections

C64fW4v.png

 

new reflections:

vP1QG7E.png

 

The reflections will now use a bit of the color of the underlying material (while not physically correct) I think it looks better.

the sceenshot are from TRR. So this part is finished.

 

Link to comment
Share on other sites

3 minutes ago, Ger_space said:

The code is already merged into the TRR master tree and I'll push in a few minutes a small update to the shader files itself.

Old reflections

C64fW4v.png

 

new reflections:

vP1QG7E.png

 

The reflections will now use a bit of the color of the underlying material (while not physically correct) I think it looks better.

the sceenshot are from TRR. So this part is finished.

 

That looks even better :) I'll update WindowShine today or tomorrow :D

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...