• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

105 Neutral

1 Follower

About clemensx

  • Rank

Personal Information

  • Interests


  • Github
  1. yes ChuckNovice, this is exactly what I meant. A simple format change from B8G8... to R8G8... will not work. Some details can be found in the official docu at https://msdn.microsoft.com/de-de/library/windows/desktop/dn903862(v=vs.85).aspx I ended up doing the same thing as you, using a very simple triangle setup that spans the whole screen and copying the texture there using normal shader code. Kind of what you need to do anyway for a number of reasons, like blur effects and many more.
  2. CopyTextureRegion is extremely difficult to use, because you have to make sure that the formats match. I used a similar approach as you in a performance test: copying a loaded texture directly to swap chain back buffer of my output window. Some textures would work, others not. That could explain why your app does not work on the other PC at all. I guess the only good way to get the image from your compute shader back to the output window is the thing you didn't want to: Use the texture in a regular draw call, because that will convert the different formats for you. I know it sounds silly to program a shader for a simple copy to output window, but at least I cold not find another way. Bottom line: CopyTextureRegion is fine to copy areas between your own buffers that have the same format, but has not much use in copying to the swap chain back buffer, because that buffer type will depend on the machine you run your program on.
  3. Pre-compiled HLSL shader question

    I prefer to do this via property pages in VS 2015 instead of calling fxc directly. You don't have to bother that much with compile parameters that way. However, in VS 2015, you can use this to set the variable name that holds the compiled binary shader code: /Vn   Via parameter pages you can use some nice placeholders, so you just need to copy/paste with new shaders, e.g. like below:   Page: HLSL Compiler / Output Files: Header Variable Name:    binShader_%(Filename) Header File Name:           $(ProjectDir)\$(Platform)\$(Configuration)\Output\$(ProjectName)\CompiledShaders\%(Filename).h   So all my shader headers follow the same name scheme and are all put into the same folder
  • Advertisement