Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by Kavarna

  1. Till you get on your home PC. Maybe there's a typo. Check the spelling of "POSITION", "COLOR" and "INSTANCE" in shader. Check is VS is a valid pointer (ie not nullptr). These are some mistakes I've made in the past, maybe it's one of them.
  2. Anything from the debug layer? If you don't know to enable debug layer, it's very simple. Just add D3D11_CREATE_DEVICE_DEBUG to flags when creating a Direct3D device. UINT creationFlags = 0; #ifdef _DEBUG creationFlags |= D3D11_CREATE_DEVICE_DEBUG; #endif D3D_FEATURE_LEVEL capabilities; D3D11CreateDeviceAndSwapChain( NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, creationFlags, featureLevels, //D3D_FEATURE_LEVEL * ARRAYSIZE(featureLevels), //number of feature levels D3D11_SDK_VERSION, &swapChainDesc, &m_swapChain, &m_device, &capabilities, &m_devCon); Check this for further reading. If you enable this, I'm sure you'll fix the error in no time. Tell me if you fixed the issue or you need further help.
  3. Ok. That makes sense. Thank you a lot for answering me!
  4. So, I am trying to do something fairly simple. Copy the content from one texture into another and then copy the result texture inside the first. (I'll also do some additional editing on the result texture and that's why I am copying the result back). But I am getting some strange results and the photo is loosing quality. Here is the Compute Shader I've used: Texture2D ObjTexture : register(t0); RWTexture2D<float4> ObjResult : register(u0); SamplerState ObjWrapSampler : register(s0); [numthreads(32, 32, 1)] void main(uint3 DTid : SV_DispatchThreadID) { float width, height; ObjTexture.GetDimensions(width, height); width -= 1; // X = [0 ... width-1] height -= 1; // Y = [0 ... height - 1] float2 uv = float2(DTid.xy) / float2(width, height); ObjResult[DTid.xy] = ObjTexture.SampleLevel(ObjWrapSampler, uv, 0); return; } and here is how I copy the result image back into the input one ID3D11Resource * inputTexture; inputTextureSRV->GetResource(&inputTexture); mContext->CopySubresourceRegion(inputTexture, 0, 0, 0, 0, mTexture.Get(), 0, NULL); I also tried copying the first texture inside the second texture and use an Unordered Acess View from the first texture, but I got the same result ... Is there something I am doing wrong here? This is the original texture This is the texture after ~60 passes And this is after ~240 passes. This is 'the final result' because it doesn't change anymore. As you can see, the image lost it's quality.
  5. This was the problem. Now that I know which is the problem, a point sampler makes sense. I haven't used Load up until now, but it looks like a good replacement for Sample in Compute Shader. Thank you very very much!
  6. Kavarna

    GPU Raytracing

    They are location in 3d world. I took your advice, it worked. Thank you very very very much!
  7. Hi everybody! I am currently trying to write my own GPU Raytracer. I am using DirectX 11 and Compute Shader. Here is what I've tried so far: RayTracer.hlsl RayTracingHeader.hlsli But the result is not what I expected. For example, the sphere is located at (0,0,10) with radius 1, but this is the result when CamPos is 4.5, which I think is wrong. Also, for some reason, when I rotate the camera, the sphere expands. Anyone could give me some pieces of advice, please?
  8. Kavarna

    WoA V - Afterparty/Judging thread

    Here is our Post Mortem #PizzaFestWasHere
  9. Kavarna

    Week of Awesome V: Post Mortem

    Almost a week after the end of the contest. Here are my thoughts about the contest. Overall, I think it was a very nice week. This is first time when I worked with someone (same for SilviuShader), so it has been an unforgettable experience. Also, I made new friends, because I didn't know anybody in team before the contest... Things that went well Even thought this was the first time when me and SilviuShader worked together we got along very easy. The whole programming part went quite well. We didn't have major problems. I liked working with placeholder content (I love those cups :)) ) I am very proud of that Day-Night cycle and the tutorial. Also, I really like the models and the SFX. Things that didn't went so well We had some problems with large models (for some reason DirectX TK wouldn't render them) Day 5 didn't get a comment To sum up, this was a very nice experience.
  10. Kavarna

    WOA V - Day 6

    AMD Radeon HD 8500M user here. I can't even start the game. Look here a screenshot, maybe it'll help. If I enable DO_DEBUG.txt file. Nothing is printed there.
  11. Kavarna

    Project Castle Day 5 update

    I hope I'll be able to play this game on my PC. The game looks like it's really fun.
  12. Kavarna

    Week of Awesome V - Day #5

    Nice! Even though the graphics aren't the best, the game feels amazing! Something that I'd like to see is some kind of Save feature (or auto-save). Anyway, good luck!
  13. Kavarna

    Day 2 - too much stuff to do

    I really like the concept. It really looks like there's still much work to do. Good luck! I hope that this will be the game that I'll play during classes with my classmates. :))
  14. Kavarna

    Day 1 - Do not use physics engines for platformers

    This game looks awesome. Also, a very nice choice of themes. I can't wait to play this game.
  15. I want to simulate a object on a rope. Here is what I've tried: btScalar SpringLength( 3 ); btScalar PivotOffset( 0 ); btScalar SpringRange( 7 ); PlaneShape = new btBoxShape( btVector3( 1, 1, 1 ) ); btTransform tr; tr.setIdentity( ); tr.setOrigin( btVector3( 0, 0, 0 ) ); tr.getBasis( ).setEulerYPR( 0, 0, 0 ); MotionState = new btDefaultMotionState( ); MotionState->setWorldTransform( tr ); btRigidBody* pBodyA = new btRigidBody( 1, MotionState, PlaneShape ); m_pWorld->addRigidBody( pBodyA ); btTransform frameInA; frameInA = btTransform::getIdentity( ); frameInA.setOrigin( btVector3( 0, 0, 0 ) ); tr.setIdentity( ); tr.setOrigin( btVector3( 0, 60 - SpringLength - PivotOffset, 0 ) ); tr.getBasis( ).setEulerYPR( 0, 0, 0 ); MotionState = new btDefaultMotionState( ); MotionState->setWorldTransform( tr ); BoxShape = new btBoxShape( btVector3( 1, 1, 1 ) ); btRigidBody* pBodyB = new btRigidBody( 0, MotionState, BoxShape ); m_pWorld->addRigidBody( pBodyB ); btTransform frameInB; frameInB = btTransform::getIdentity( ); frameInB.setOrigin( btVector3( PivotOffset, -10, 0 ) ); btGeneric6DofSpringConstraint * pGen6DOFSpring = new btGeneric6DofSpringConstraint( *pBodyA, *pBodyB, frameInA, frameInB, true ); pGen6DOFSpring->setLinearLowerLimit( btVector3( - SpringRange, - 0, - SpringRange ) ); pGen6DOFSpring->setLinearUpperLimit( btVector3( + SpringRange, + 0, + SpringRange ) ); pGen6DOFSpring->setAngularLowerLimit( btVector3( - SpringRange, - SpringRange, - SpringRange ) ); pGen6DOFSpring->setAngularUpperLimit( btVector3( + SpringRange, + SpringRange, + SpringRange ) ); m_pWorld->addConstraint( pGen6DOFSpring, true ); for ( int i = 0; i < 3; ++i ) { pGen6DOFSpring->enableSpring( i, true ); pGen6DOFSpring->setStiffness( i, 1 ); pGen6DOFSpring->setStiffness( i + 3, 1 ); pGen6DOFSpring->setDamping( i, btScalar( 0.99 ) ); pGen6DOFSpring->setDamping( i + 3, btScalar( 0.99 ) ); pGen6DOFSpring->setParam( BT_CONSTRAINT_STOP_CFM, btScalar( (1.0E-5) ), i ); pGen6DOFSpring->setParam( BT_CONSTRAINT_STOP_CFM, btScalar( ( 1.0E-5 ) ), i + 3 ); pGen6DOFSpring->setParam( BT_CONSTRAINT_CFM, btScalar( ( 1.0E-5 ) ), i ); pGen6DOFSpring->setParam( BT_CONSTRAINT_CFM, btScalar( ( 1.0E-5 ) ), i+3 ); } pGen6DOFSpring->setEquilibriumPoint( ); The object moves like it's on a rope, but it doesn't rotate at all. I am an absolute beginner with bullet physics
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!