Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualmax343

Posted 20 November 2012 - 04:26 PM

One way I can think of is: after you finished all your regular rendering, turn off depth writes (but keep the reads), change the depth function to less-equal and turn on blending, then draw a quad just above the floor (and below the player's bbox) with increasing intensity in alpha as you go outwards from the center (maybe something like 1-gaussian) and zero in all other color channels. You don't necessarily have to use alpha for this as you can use SRC_COLOR.

This should give you a simple circle with decreasing intensity blob below the player. You can also factor in player's distance from the floor so that the circle falls of faster.

EDIT: A small refinement so that it'll look better when there's nearby geometry present which should also be "shadowed" by the model.
Render all geometry except for player models. Disable depth completely and enable blending. Draw the quad (just as you would do before, parallel to the floor) with the same circle. Re-enable depth and disable blending. Draw the model.

Scrap it. It won't play nice with occluding geometry. Though the initial approach will continue to function.

#5max343

Posted 20 November 2012 - 04:26 PM

One way I can think of is: after you finished all your regular rendering, turn off depth writes (but keep the reads), change the depth function to less-equal and turn on blending, then draw a quad just above the floor (and below the player's bbox) with increasing intensity in alpha as you go outwards from the center (maybe something like 1-gaussian) and zero in all other color channels. You don't necessarily have to use alpha for this as you can use SRC_COLOR.

This should give you a simple circle with decreasing intensity blob below the player. You can also factor in player's distance from the floor so that the circle falls of faster.

EDIT: A small refinement so that it'll look better when there's nearby geometry present which should also be "shadowed" by the model.
Render all geometry except for player models. Disable depth completely and enable blending. Draw the quad (just as you would do before, parallel to the floor) with the same circle. Re-enable depth and disable blending. Draw the model.

Scrap it. It won't play nice with occluding geometry.

#4max343

Posted 20 November 2012 - 04:10 PM

One way I can think of is: after you finished all your regular rendering, turn off depth writes (but keep the reads), change the depth function to less-equal and turn on blending, then draw a quad just above the floor (and below the player's bbox) with increasing intensity in alpha as you go outwards from the center (maybe something like 1-gaussian) and zero in all other color channels. You don't necessarily have to use alpha for this as you can use SRC_COLOR.

This should give you a simple circle with decreasing intensity blob below the player. You can also factor in player's distance from the floor so that the circle falls of faster.

EDIT: A small refinement so that it'll look better when there's nearby geometry present which should also be "shadowed" by the model.
Render all geometry except for player models. Disable depth completely and enable blending. Draw the quad (just as you would do before, parallel to the floor) with the same circle. Re-enable depth and disable blending. Draw the model.

#3max343

Posted 20 November 2012 - 03:12 PM

One way I can think of is: after you finished all your regular rendering, turn off depth writes (but keep the reads), change the depth function to less-equal and turn on blending, then draw a quad just above the floor (and below the player's bbox) with increasing intensity in alpha as you go outwards from the center (maybe something like 1-gaussian) and zero in all other color channels. You don't necessarily have to use alpha for this as you can use SRC_COLOR.

This should give you a simple circle with decreasing intensity blob below the player. You can also factor in player's distance from the floor so that the circle falls of faster.

#2max343

Posted 20 November 2012 - 03:12 PM

One way I can think of is: after you finished all your regular rendering, turn off depth writes (but keep the reads), change the depth function to less-equal and turn on blending, then draw a quad just above the floor (and below the player's bbox) with increasing intensity in alpha as you go outwards from the center (1-gaussian like maybe) and zero in all other color channels. You don't necessarily have to use alpha for this as you can use SRC_COLOR.

This should give you a simple circle with decreasing intensity blob below the player. You can also factor in player's distance from the floor so that the circle falls of faster.

#1max343

Posted 20 November 2012 - 03:10 PM

One way I can think of is: after you finished all your regular rendering, turn off depth writes (but keep the reads), change the depth function to less-equal and turn on blending, then draw a quad just above the floor (and below the player's bbox) with increasing intensity in alpha as you go outwards from the center (gaussian like maybe) and zero in all other color channels. You don't necessarily have to use alpha for this as you can use SRC_COLOR.

This should give you a simple circle with decreasing intensity blob below the player. You can also factor in player's distance from the floor so that the circle falls of faster.

PARTNERS