Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Feature: understand why bPostProcessEnabled is false and what will happen after enabling it #356

Open
q4a opened this issue Apr 19, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@q4a
Copy link
Contributor

q4a commented Apr 19, 2022

I would like to understand:

  • why bPostProcessEnabled is false?
  • should I rewrite it from asm to HLSL?
  • what will happen after enabling it?

Some log from discord - already known information:

q4a — 03.05.2021
I wanted to understand what current shaders do and started with small one:
https://github.com/storm-devs/storm-engine/blob/develop/src/techniques/postprocess/postprocess_shader.h
But looks like it was disabled and newer calls because of this line commented out:
https://github.com/storm-devs/storm-engine/blob/develop/src/libs/renderer/sdevice.cpp#L361
It was modified in this commit:
02d86a9#diff-d19d7f5cf5224e1c43653497eae01f143fa786809b3c5bcf651d98e13db8720aL391
and I would like to know - should I ignore this shader or better remove it?

kb31 — 03.05.2021
Honestly, I do not remember why did I disable it
Likely it was causing issues
I think we should try to turn it back anyway

q4a — 03.05.2021
when I turned on it in code and engine.ini - I got black screen instead of intro video

kb31 — 03.05.2021
That might be because some code is missing from dx9render.cpp...

cooodesloth — 03.05.2021
@q4a you could also try to find a related commit in the thunderstorm fork to know exactly why it was disabled

q4a — 03.05.2021
I found: storm-devs/thunderstorm-engine@696d2eb

cooodesloth — 03.05.2021
seems like it was disabled even before storm-devs/thunderstorm-engine@696d2eb#diff-7baa1c729b48852f3fa56b26eb0338225e2071f7e2ae4697c86835bccb8348e7L736

kb31 — 03.05.2021
Yeah as I said I disabled it long time ago
As I recall now, I likely tried to achieve correct sequence of directx device free
So this was not meant to be disabled forever, that's why the shader was not removed

@q4a q4a added the enhancement New feature or request label Apr 19, 2022
@q4a q4a self-assigned this Apr 19, 2022
@q4a
Copy link
Contributor Author

q4a commented Apr 19, 2022

I did simple enabling it in develop branch: https://github.com/storm-devs/storm-engine/tree/0a36c919d09cd3c903ff328341a5e1caad797ec8

user@ali MINGW64 /c/git/storm-engine-noChang (develop)
$ git status
On branch develop
Your branch is up to date with 'origin/develop'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   src/libs/renderer/src/s_device.cpp

no changes added to commit (use "git add" and/or "git commit -a")

user@ali MINGW64 /c/git/storm-engine-noChang (develop)
$ git show --summary
commit 0a36c919d09cd3c903ff328341a5e1caad797ec8 (HEAD -> develop, origin/develop
, origin/HEAD)
Merge: abdce362 6f1aea88
Author: espkk <[email protected]>
Date:   Mon Apr 4 18:24:24 2022 +0300

    Merge pull request #351 from storm-devs/fix/script-cache-crash

    [core] Fix script cache crash


user@ali MINGW64 /c/git/storm-engine-noChang (develop)
$ git diff
diff --git a/src/libs/renderer/src/s_device.cpp b/src/libs/renderer/src/s_device
.cpp
index dd756e75..474a19ba 100644
--- a/src/libs/renderer/src/s_device.cpp
+++ b/src/libs/renderer/src/s_device.cpp
@@ -491,7 +491,7 @@ bool DX9RENDER::Init()
     if (ini)
     {
         // bPostProcessEnabled = ini->GetInt(0, "PostProcess", 0) == 1;
-        bPostProcessEnabled = false; //~!~
+        bPostProcessEnabled = true; //~!~

         // screenshot format and extension
         ini->ReadString(nullptr, "screenshot_format", str, sizeof(str), "jpg");

And got many bugs. Intro video was black. Also here is main screen + few in game screens:
main-screen
in-game1
in-game2
in-game3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant