Jump to content
  • Advertisement

lonewolff

Member
  • Content count

    1256
  • Joined

  • Last visited

Community Reputation

1198 Excellent

About lonewolff

  • Rank
    Contributor

Personal Information

  • Role
    3D Artist
  • Interests
    Art
    Audio
    Design
    Programming

Recent Profile Visitors

16593 profile views
  1. lonewolff

    VSSetConstantBuffers1 Problems

    256 byte minimum? I have always bust made my CB's meet a 16 byte alignment and have never run into any problems.
  2. lonewolff

    What does MMORPG require?

    In other words, an MORPG. Not an MMORPG. There is a big difference. 'Massive' difference.
  3. lonewolff

    Framebuffer

    Can I buy a vowel?
  4. 1 - Smaller graphical assets, smaller installer package / download. 2 - Faster loading to the GPU. 3 - Faster rendering, less verts to process. Seems like a win-win situation to me.
  5. lonewolff

    Input Layout question

    Thanks for the replies, guys. Gives me a couple of things to think about trying. I wonder if the creation of the input layout requires the full shader to compare against, or whether it would succeed with just a valid 'input section'. If the latter is the case, we might be able to create an 'fvf blob' on the fly by 'engineering' a valid shader input.
  6. Hi Guys, I understand how to create input layouts etc... But I am wondering is it at all possible to derive an input layout from a shader and create the input layout directly from this? (Rather than manually specifying the input layout format?) Thanks in advance :)
  7. lonewolff

    Problems with directional light

    I have scrapped this method for another.
  8. Hi guys, I am having troubles implementing a directional light in HLSL. I have been following this guide https://www.gamasutra.com/view/feature/131275/implementing_lighting_models_with_.php?page=2 but the quad is rendering pure black no matter where the light vector is pointing. My quad is in the format of position, texcoord, & normal. This is the shader so far, cbuffer ModelViewProjectionConstantBuffer : register(b0) { float4x4 worldmat; float4x4 worldviewmat; float4x4 worldviewprojmat; float4 vecLightDir; } struct VS_OUTPUT { float4 Pos : SV_POSITION; float3 Light : TEXCOORD0; float3 Norm : TEXCOORD1; }; VS_OUTPUT vs_main(float4 position : POSITION, float2 texcoord : TEXCOORD, float3 normal : NORMAL) { float4 newpos; newpos = mul(position, worldmat); newpos = mul(newpos, worldviewmat); newpos = mul(newpos, worldviewprojmat); // return newpos; VS_OUTPUT Out = (VS_OUTPUT)0; Out.Pos = newpos;// mul(newpos, matWorldViewProj); // transform Position Out.Light = vecLightDir; // output light vector Out.Norm = normalize(mul(normal, worldmat)); // transform Normal and normalize it return Out; } float4 ps_main(float3 Light: TEXCOORD0, float3 Norm : TEXCOORD1) : SV_TARGET { float4 diffuse = { 1.0f, 0.0f, 0.0f, 1.0f }; float4 ambient = { 0.1, 0.0, 0.0, 1.0 }; //return float4(1.0f, 1.0f, 1.0f, 1.0f); return ambient + diffuse * saturate(dot(Light, Norm)); } Any help would be truly appreciated as this is the only real area of DX11 that I really have difficulties in. Thanks in advance.
  9. lonewolff

    DirectXMath matrix query

    Nice! This is great to know!
  10. lonewolff

    DirectXMath matrix query

    Awesome reply, thank you. I'll have a closer think about what I want to achieve here.
  11. lonewolff

    DirectXMath matrix query

    Hi Guys, I have been writing my own implementation of the XMMatrix* functions in assembly and the results are amazing, being roughly 500% faster than the MS implementation. It got me thinking, why do we need to 'transpose' the matrix results as an additional call? I understand why it has to be done, being the adjustment from Row major to Column major etc. But wouldn't it make sense for the library to do this for us behind the scenes, making things even more efficient. Or am I missing something? Why wouldn't the MS libraries already take transposition in to account? Love to hear your thoughts on this.
  12. lonewolff

    Please help with ASM question

    Nice thanks for the tip. I'll give that a try.
  13. lonewolff

    Please help with ASM question

    Thanks for the reply. Actually I got this working about an hour after posting, apologies for not replying back then. invoke QueryPerformanceFrequency, addr TimeFrequency invoke QueryPerformanceCounter, addr TimeEnd fild TimeEnd fild TimeStart fsub fild TimeNanoSecond fmul fild TimeFrequency fdiv fistp TimeElapsed inc nCounter mov eax, DWORD PTR TimeElapsed[0] mov ebx, 1000000000 cmp eax, ebx jl skip invoke itoa, nCounter, addr szBuffer, 10 invoke SetWindowText, hWnd, addr szBuffer mov nCounter, 0 invoke QueryPerformanceFrequency, addr TimeFrequency invoke QueryPerformanceCounter, addr TimeStart skip:
  14. Hi Guys, I am currently playing around with MASM and am currently stumped on how to implement my frame rate counter. The problem is caused by QueryPerformanceCounter returning a LONG INTEGER which is 64 bits in length. So I am struggling to work out how to calculate a few things. This is what I have ported over so far from my C/C++ code. invoke QueryPerformanceFrequency, addr TimeFrequency invoke QueryPerformanceCounter, addr TimeEnd ;TimeElapsed.QuadPart = TimeEnd.QuadPart - TimeStart.QuadPart; mov eax,DWORD PTR TimeEnd[0] sub eax,DWORD PTR TimeStart[0] mov ecx,DWORD PTR TimeEnd[+4] sbb ecx,DWORD PTR TimeStart[+4] mov DWORD PTR TimeElapsed[0], eax mov DWORD PTR TimeElapsed[+4], ecx // I think this is correct up to here ;TimeElapsed.QuadPart *= 1000000000; // **** Not sure what to do here ;TimeElapsed.QuadPart /= TimeFrequency.QuadPart; // **** Not sure what to do here inc nCounter ;if (TimeElapsed.QuadPart > 1000000000) // *** Not sure what to do here .if 1 ; placeholder invoke itoa, nCounter, addr szBuffer, 10 invoke SetWindowText, hWnd, addr szBuffer mov nCounter, 0 invoke QueryPerformanceFrequency, addr TimeFrequency invoke QueryPerformanceCounter, addr TimeStart .endif Any help would be absolutely awesome! Thanks in advance
  15. lonewolff

    Problems with shift left (<<)

    Thanks JoeJ, Yep, it was the signed / unsigned thing that was tripping me up in the end. Thanks to everyone for the help
  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!