Temaran/UnrealEngineShaderPluginDemo

Maybe the readMe.md is old

Closed this issue · 6 comments

Hello,Sir Temaran
words:
"How to use this project: I would recommend checking out the example project supplied in this repository to understand how to best use the project code. "

  1. Is the master branch is the example project?
  2. CopyToEngineShaders/ folder ---->ShaderCopyHelper?

from a greenhand,just for how to add shaders and debug them

Help
SOS
:)

Hello there!

Sorry for the slow reply, I just got home from a month long vacation xD
Im not sure what your questions are.

The example project is the entire repo (all branches), so just use the
uproject file to generate a solution file and run it like normal.
The shader copy helper will copy the usf shader files to the Engine/Shaders
folder.

I havent given this project any love for some time now, so Ill try to give
it an update when I have some time over, both the content itself as well as
the documentation!

Best regards,
Temaran

2016-09-01 5:23 GMT+02:00 wjingzhe notifications@github.com:

Hello,Sir Temaran
words:
"How to use this project: I would recommend checking out the example
project supplied in this repository to understand how to best use the
project code. "

  1. Is the master branch is the example project?
  2. CopyToEngineShaders/ folder ---->ShaderCopyHelper?

from a greenhand,just for how to add shaders and debug them

Help
SOS
:)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AE025L8I9UaLIfSXUPXVZenw8ur77oZgks5qlkU3gaJpZM4JyRzK
.

A vacation,necessary! I love it,too
I'm sorry for my poor words.

I tried to build it by vs2015 update 3--->should be update 1
As you known, I get myself into troubles.
My faults.
At last i got 4.11.2 from git and launcher both, your demo is really work well with update 1.
Because I know less about these codes,I can't build it by 4.12 or above.
Maybe just for 4.11.2 is enough,if you don't have so much time.

Actually, i wanna learn how to debug .usf with your codes and I failed.Although it run well,but after I having captured frames by renderdoc, the shader codes are assembly codes like these:

Shader hash 80cc2f16-4d7ef57b-02cb9e21-cf91e652

vs_5_0
      dcl_globalFlags refactoringAllowed
      dcl_input v0.xyzw
      dcl_input v1.xy
      dcl_output o0.xy
      dcl_output_siv o1.xyzw, position
   0: mov o0.xy, v1.xyxx
   1: mov o1.xyzw, v0.xyzw
   2: ret

I finished that:
1)In "Engine\Config\ConsoleVariables.ini" set r.ShaderDevelopmentMode=1 r.DumpShaderDebugInfo=1 r.DumpShaderDebugShortNames=1.Just remove ; before these words.
2)Set the sln(codes get from github) configuration as DebugGame. The ShaderCompileWorker is using Debug_Program.

Could you give me a hand?I can't get it from the docs.Some friends told me to use ShaderCompileWorker.I'm trying the command line tools now.

Best regards,
JingzW

Hello there!

I'm not certain exactly what you want to do. Do you want to step through usf code? If that is the case, then I don't think it's easily done at the moment unfortunately.

You can use RenderDoc to analyze frames and see what is called when, and inspect the compiled shader code, but I don't think you can do interactive debugging (breakpoints etc).

If you figure out how though I'd love to hear all about it! :D

:D Done!
Thank you~It really works.(Before been told,I don't believe it can satisfy me.)
When add some annotations for shader codes, I can compare the compiled shader codes with the src hlsl codes and find out where it's located to and step through them.
After then , I don't need to step through usf code so much when debugging.So what I want to do is confirming that my annotations are still there after being compiled.

But how to configure that in UE4?

qq 20160909152317

Yeah, I'm not sure...
When I debug I usually correlate the compiled shader code with the usf in my head.
I'm sure it would be possible to somehow set it up so it correlates it automatically using the compiled data, but I haven't looked into it :)

I got what i want.
r.Shaders.Optimize=0
r.Shaders.KeepDebugInfo=1

Actually it doesn't matter this demo.Should I delete my words above?