Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

118 Neutral

About trojanfoe

  • Rank

Personal Information


  • Twitter
  • Github
  • Steam

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. trojanfoe

    GIMP vs Adobe

    For pixel art, look at Graphics Gale. It's free. I really dig Marmoset Hexels though.
  2. I have been doing C++/DirectX 11 dev for a few months and this is greatly helped by DirectXTK and the VS templates provided by Chuck et al. However I was a bit disappointed that Xbox UWP apps using DirectX 11 only use shader model 4 which could cramp my style if I wanted to play with compute shaders. In order to get SM5 on Xbox/UWP you have to go DirectX 12. Having said that, there is plenty to work with, resource wise, when going DirectX11.
  3. Isn't the idea that UWP is "sandboxed" like Mac apps and mobile apps in order to provide more security? In that case they won't have access to anything external and only stuff in their own bundle. I have some experience with Mac sandboxed apps but have only had a cursory look at UWP apps as I am considering them as a viable target platform.
  4. trojanfoe

    Unity SetQualityLevel persistence

    Option 5 sounds best to me, if my vote counts
  5. I would personally not bother with the single-header file implementation and instead move the implementation into .cpp files. You will end up with cleaner looking code and avoid your issue altogether.
  6. trojanfoe

    Migrating from Win32 (DX) to UWP

    Looking at the UWP documentation it looks like this requirement to use DirectX 12 in order to get full access to the GPU is not true at all. That's very good news as it means you can use DirectX 11 and provide Win32 binaries targetting Win7 (still 35% market share?) as well as UWP apps targetting Win10/XBoxONE. Can anyone confirm this?
  7. trojanfoe

    Migrating from Win32 (DX) to UWP

    I am also interested in targetting UWP but have never developed for it. You will get a flavour of what's involved if you install the Direct3D Game Templates for VS and create a solution with a "UWP DirectX 11 (or 12) DR C++/WinRT" project and a "Win32" version and look at the implementation in Main.cpp and DeviceResources.cpp (Game.cpp is 99% the same in both, which is greate). From what I can see you won't have to learn much about UWP and WinRT as that's taken care of by the template (WinRT is the Windows Runtime subset of Win32 API calls that's supported on all Win10 platforms). Also check out this video about C++/WinRT from Microsoft as it means you can write in ISO C++ and not C++/CX and that's a good thing. Something else I found out recently is that if you want more of the GPU from your UWP game on Xbox One then it needs to be DirectX 12, which could be a show-stopper for some.
  8. Yep, that was my next step, however I thought I'd just ask to see if it was possible.
  9. OK, so that's not working. This is what it tooks like (text is bottom left): Here is the blend state creation code: D3D11_BLEND_DESC blendDesc = {}; blendDesc.RenderTarget[0].BlendEnable = TRUE; blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; blendDesc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD; blendDesc.RenderTarget[0].SrcBlend = D3D11_BLEND_ONE; blendDesc.RenderTarget[0].DestBlend = D3D11_BLEND_SRC_ALPHA; blendDesc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD; blendDesc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE; blendDesc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO; ThrowIfFailed( d3dDevice->CreateBlendState(&blendDesc, s_invertedBlendState.GetAddressOf()), "create Text inverted blend state" ); and here is the pixel shader: Texture2D txDiffuse : register(t0); SamplerState samp : register(s0); float4 main(PS_IN_PosColTex input) : SV_TARGET { float4 color = txDiffuse.Sample(samp, input.tex); return float4(color.rgb * color.a + 1 - color.a, color.a - 1); } However on the screen the text has black boxes instead of white from the screenshot. I use a stack of Scene objects with the UI Scene being on top. In the render loop I clear a render target to transparent and each Scene renders their content onto the render target and finally the render target is written to the window render target (this is for future expand where post-processing is expected). Would have some bearing on any of this?
  10. Whoa! That's amazing. I'll try this tonight and get back to you. Many thanks!
  11. Yes. Basically I want to see the text regardless of colour of the pixel behind (this is only for debug text as I don't think that would look much good in production).
  12. I have been trying to create a BlendState for my UI text sprites so that they are both alpha-blended (so you can see them) and invert the pixel they are rendered over (again, so you can see them). In order to get alpha blending you would need: SrcBlend = SRC_ALPHA DestBlend = INV_SRC_ALPHA and in order to have inverted colours you would need something like: SrcBlend = INV_DEST_COLOR DestBlend = INV_SRC_COLOR and you can't have both. So I have come to the conclusion that it's not possible; am I right?
  13. I had problem the VS graphics debugger crashing when I don't take a snapshot. If I take one, it's ok (this is using VS2017 with latest update). How do people rate nsight against the VS graphics debugger or RenderDoc?
  14. OK, fixed it. Beginners mistake. I had forgotten to set the viewport of the window before rendering from render texture to window
  15. Hi there, I am rendering my game to render textures but I am having difficulty figuring out how to scale it to fill the window. The window looks like this: and the render texture looks like this (it's the window resolution downscaled by 4): (I implemented a screenshot function of the render texture which has proved to be very useful getting this working so far). My vertex shader is the classic "draw fullscreen triangle without binding a vertex or index buffer" as seen many times on this site: PS_IN_PosTex main(uint id : SV_VertexID) { PS_IN_PosTex output; output.tex = float2((id << 1) & 2, id & 2); output.pos = float4(output.tex * float2(2, -2) + float2(-1, 1), 0, 1); return output; } and the pixel shader is simply: Texture2D txDiffuse : register(t0); SamplerState samp : register(s0); float4 main(PS_IN_PosTex input) : SV_TARGET { return txDiffuse.Sample(samp, input.tex); } Can someone please give me a clue as to how to scale this correctly? Many thanks, Andy
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!