Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 May 2010
Online Last Active Today, 06:58 AM

Posts I've Made

In Topic: Multiple Point lights in Deferred Rendering

14 October 2016 - 06:28 AM

May have a look at this tutorial:


I think it's one of the best tutorial series to get into deferred rendering. And of course there is lot of space for improvements.

Maybe it's a little bit old but the idea behind still works.

tl;dr: Draw a sphere mesh in the lightpass for every light. You can use instancing here or try it first with single drawcalls.

Then use the depth information and the albedo-color from your model-drawpass to light the scenery.

Only pixel within the mesh will get checked and colored if there are inside of the lightsource.

In Topic: Trouble passing multiple lights

11 October 2016 - 09:04 AM

Did you tried to get the real information for your Constantbuffers from the ID3D11ShaderReflection interface for both vertex- and pixelshader? Maybe there are some differences.

In Topic: Animated movies.

04 February 2016 - 11:09 AM

I think the easiest and cheapest way to get into animated movies, is to use Blender. You can create models and animations but also render them for a full movie. Actually they made a movie completely in blender with a big bunny ( don't know the name right now)


If you want to do it on your own, you have to write an engine (Rasterizer like UE4, Unity etc. or Raytracer like 3D Studio Max, Blender etc.) and store keyframes on a timeline with matrices (position, rotation, scale) for every object/objectpart in your scene. Now you can interpolate between those frames, render and store them as a video.

In Topic: This singleton keeps crashing.

24 July 2014 - 02:42 AM

This *(int*) doesnt work in my opinion, because you subtract the content of the adresses instead of subtract the addresses of the pointers. This little piece of code should just calculates the offset from the Singleton class to the covered class. So in memorylayout the ms_Singleton-member needs its 4 or 8 byte for its pointer-storage. Appended to ms_Singleton the covered-class members are aligned. So to get the right startposition when GetSingleton is used, the pointer is shifted by the calculated offset. Afaik this code was a workaround for older compilers and the newer ones automatically calculate those pointer-shiftings. I would give it a try to just cast the pointer ms_Singleton = (T*)this;

In VS2013 it should probably work, but I haven't tried it on Linux or Mac.

Btw. using int as datatype is critical, because it's size isn't constant through x86 and x64 and different OS. You should use char, short or long.

In Topic: Basic Rendering

21 January 2014 - 12:47 PM

Create the same amount of vertexbuffers, one for each object. The vertex-struct for each object can be different but you have to draw all objects with a single draw-call.


Alternative: One big vertexbuffer, copy all objects into this (one after another in memorylayout like an array). But the vertex-struct has to be the same for all objects. Advantage is, you can draw all objects with one single draw-call if you use the trianglelist-topology. If not do a drawcall for every object but with different starting indices obvioulsly.