Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 May 2008
Online Last Active Today, 10:45 PM

Posts I've Made

In Topic: MVC understanding

Today, 09:01 PM

I'm gonna take a side and say drop MVC altogether. The reasons have been stated by those posting before me. All you need to begin with is a simple game loop. Then expand into a entities - component system.

In Topic: When does the perspective divide occur when using the shadow matrix to implem...

11 September 2016 - 01:35 AM

The short answer is that the perspective divide is done with the division by n dot L. While you can't see it in the code snippet you've given, it is done implicitly when the graphics pipeline converts from homogenous 4d space to normalized device coordinate space.



For a more thorough explanation, notice that your vertex shader usually returns a 4d floating point vector. You might ask, why a 4d vector rather than a 3d one? The answer is that having the extra information allows you to do convienient things to your 4d vector with matrices(it's very mathy, will skip). The importance of this 4th value is usually induced when you multiply with projection matrices(ie. your shadow matrix, the projection matrix that is implicitly generated when you call setperpective), and it is kept around.

In Topic: LLVM and visual studio 2013 problems (precompiled headers + windows.h))

05 September 2016 - 04:26 AM

No replies from any llvm users? Pity:( For something that posts good benchmarks over other compilers, it seems that people arent using it much to talk about it.

In Topic: Compiling Hlsl - Shaders In Vs 2013

10 August 2016 - 10:00 PM

Unfortunately, VS2013's hlsl vertex/pixel shader compiling is a one input to one output file thing only. I solved this via writing a batch file to run fxc.exe on my input files and then setting it to run it as a postbuild event in the project's settings (ie. writing my own shader build system). Here's a few lines of batch file code to compile a simple vertex shader.


set shadercompile="%DXSDK_DIR%\Utilities\bin\x64\fxc.exe"

set entryfuncName=VS

%shadercompile% input_hlsl.hlsl /E"%entryfuncName%" /Fo"output.cso" /Tvs_4_0 /nologo


Then all you have to do for a "compile on modifying shader source code" feature is to create a file after the process, check if input files are modified later than that lock file, then compile if true.

In Topic: [D3D11]Any explanation for a temporary performance hit on binding a 4k by 4k...

02 July 2016 - 04:56 AM

Are you sure your GPU has enough memory? System will silently transfer data between GRAM and RAM.

Your explanation reminds me of situation I had in a game I played: I had 60 FPS with static scene but whenever I turned camera it dropped to 10 FPS only because PC didn't have enough GRAM to fit all textures at once.


It should have enough, gtx650 has 1gb of dedicated ram and I have very few assets in gpu(~20-30 textures, most of them 256x256). But to confirm, is there a way to find out how much memory is left in GRAM?