Tag Info

Hot answers tagged

1

Do not use full screen quads for your light volumes. A simple way is to draw a sphere for each light, in the position that the light occupies and of the same radius. This way, only the fragments actually affected by the light will be affected and your fragment shader will not be executed for the entire screen surface.


1

If you work out your matrix math, you'll see that the resulting w component of a vector/matrix multiplication depends on what's in the 4th column of the matrix. If the last column is [0 0 0 1] (which it typically is for most translation/orientation matrices), then the w component will be whatever the w component of the vector was. However for a typical ...


1

So after a few days of digging i finally found this question which is asking the exact same thing as me. He fixed the issue by using in my opinion a dirty hack. This involves getting the vertex colors from the original BasicShader when the model is created. The when it comes to draw, that color is passed in a parameter to the shader which in-turn uses it as ...


1

You can use CheckDeviceFormat to determine if a given D3DFORMAT is suitable for the device's backbuffer; it's unlikely that particular format will be. Instead, try creating the device with any old acceptable backbuffer format (D3DFMT_X8R8G8B8 for example); it doesn't matter since you won't be rendering to it. Then create a new texture with the desired ...


1

Many possible reasons why something would not be rendered but if the difference is only in the matrix, here's some that I think might be most likely: Camera is too far (a triangle of size 1 in distance ~1732 with 45 degree FOV might simply be too small to see) You're looking at the triangle from the other side and culling is enabled (seems a bit unlikely ...



Only top voted, non community-wiki answers of a minimum length are eligible