Jump to content
  • Advertisement

Bartosz Boczula

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

117 Neutral

About Bartosz Boczula

  • Rank
    Newbie

Personal Information

  • Interests
    Programming

Recent Profile Visitors

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

  1. Bartosz Boczula

    Shadow Map Details

    Hey guys, thanks for all the support, thanks to that I made some progress! My blitter shader looks like this: float4 main(PS_INPUT input) : SV_TARGET { float4 val = shaderTexture.Sample(sampleType, input.textureCoordinates); return float4(val.b, frac(val.g * 10), frac(val.r * 100), 1.0); } This seem to work, I'm now able to see my D16 texture as R8G8B8A8 Render Target. But of course, this can't be too easy, can it This is my result: I might add that this looks normal with Perspective camera. @ChuckNovice did you have such issue?
  2. Bartosz Boczula

    Shadow Map Details

    @lawnjelly Ok, I decided to take a step back - I'm using my Perspective camera, the one that I know that works. I created a blitter render pass, which should render my already filled depth buffer on the screen, however the result is all red. I'm guessing this has something to do with the formats. My depth texture is in R16_TYPELESS format, Shader Resource View in R16_UNORM, but my Render Target is in R8G8B8A8_UNORM - how would 16-bit value will be written to a 32-bits slot?
  3. Bartosz Boczula

    Shadow Map Details

    Thank's guys, I'm making some good progress here. One question though - I changed my projection calculation from Perspective to Ortographic, but when I did that, it seems that camera position has no impact at all at the final image. I set (100.0f, -100.0f, 100.0f) and then (1.0f, -1.0f, 1.0f) and the result was exactly the same. The only way to change the output is to change viewWidth and viewHeight of this function: DirectX::XMMatrixOrthographicLH(128.0f, 128.0f, 0.1f, 100.0f); So when I set it to 1024x1024 the object gets really small, and when I set it to 128x128 the object gets bigger. Why is that?
  4. Bartosz Boczula

    Shadow Map Details

    Thanks @Mike2343. Just for clarification, I'm writing in C++ with DX11. My current version has only Phong lighting, with one "sunlight" component, no point lights or spot lights. My camera component doesn't have "direction" property, only LookAt, Up and Position. For lighting calculations, I only needed sunlight direction and that was ok. So my question was - what sunlight position should I use? I mean, should I like pick whatever or there are some "guidelines"? P.S. This was my first post, thank you for not dissing it and explaining instead
  5. Bartosz Boczula

    DX11 Shadow Map Details

    I think I understand the idea behind Shadow Mapping, however I'm having problems with implementation details. In VS I need light position - but I don't have one! I only have light direction, what light position should I use? I have working camera class, with Projection and View matrices and all - how can I reuse this? I should put camera position, but how to calculate "lookAt" parameter? Is this suppose to be ortographic or perspective camera? And one more thing - when in the 3D piplene is the actual write to the Depth Buffer? In PS or somewhere earlier? Br.,BB
  • 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!