Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Mar 2013
Online Last Active Today, 11:49 AM

Posts I've Made

In Topic: Strange soft shadow shader errors

24 October 2016 - 10:29 AM

Are you updating the shadow map per frame? Or are you only creating/rendering to it at initialization time, and using the Shadow Map texture as input there on? If per frame, try just rendering to the shadow map once, and use the resulting texture from that point, and see if that resolves the issue.

In Topic: Strange soft shadow shader errors

23 October 2016 - 07:15 PM

Well, the answer is simple. Don't rotate your light viewMatrix with your player viewMatrix (Unless, of course, the position of the light can indeed rotate, and translate, or change directions). Somewhere in your update function, or else where, you must be updating both of them to some degree when receiving input.


At this point it may be a good idea to post realtive code to for these functions.



In Topic: Strange soft shadow shader errors

22 October 2016 - 11:44 PM



Some thoughts off the top of my head. Not sure if they apply, but let's see if they stick. When you say, "Render the scene from the cameras POV", are you referring to the player camera, or a camera that is positioned in the perspective of the light source? It just seems a trifle odd when you adjust your player camera, it would affect the, "light camera". Unless of course your player is holding a flashlight, or something similar.


Also, the issue your seeing with the shadow looks to me to be, "Peter Panning". Are you building this shadow map from a depthBuffer, or are you performing stencil shadowing for planar surfaces? If from a depthBuffer, you'll have to take into account a bias when sampling from the shadow map due to the limited precision of the depthBuffer. i.e. to little of a bias causes self shadowing, "acne", and to much of one can cause Peter Panning.




In Topic: 3D games: character is small compared to the size of objects in the world

18 October 2016 - 01:37 PM

Well sometimes artists just eyeball things. Using a pinch of intuition they can sometimes make something that can look great, a little off, or just plain odd. Modeling things to scale is important if your making a game that is attempting mirror reality.


When making fantasy games like Skyrim, I think they have a little bit more freedom. I mean (Though this was obviously not the point you were making) who knows how big a Dragon is? Maybe that hut looks small because Dwarfs live in it. Basically I'm backing WoopsASword in the realm of Fantasy Genres.



In Topic: Blending texture to backbuffer

13 October 2016 - 03:10 PM

Oh, I see like post-processing.


hmmm (there might be a better way to do it), in your pixel shader you could do something like this:

Where color1 would be your backbuffer, and color2 the offscreen texture for your HUD.

color1 = colorMapOne.Sample(sampler, texel.texCoord);
color2 = colorMapTwo.Sample(sampler, texel.texCoord);

blendColor = color1 * color2 * 2.0;

Marcus Hansen