From 47e50c1ca2e7840ad2531853caa9a2b9a0a5572e Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Wed, 14 Mar 2001 04:36:13 +0000 Subject: [PATCH] drop shadow at zero depth offset, from drose --- panda/src/text/textNode.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panda/src/text/textNode.cxx b/panda/src/text/textNode.cxx index c4dd196988..fc1e427fd5 100644 --- a/panda/src/text/textNode.cxx +++ b/panda/src/text/textNode.cxx @@ -444,8 +444,13 @@ do_rebuild() { if (has_shadow()) { // Make a shadow by instancing the text behind itself. + + // For now, the depth offset is 0.0 because we don't expect to see + // text with shadows in the 3-d world that aren't decals. Maybe + // this will need to be addressed in the future. + LMatrix4f offset = - LMatrix4f::translate_mat(_shadow_offset[0], 0.01, -_shadow_offset[1]); + LMatrix4f::translate_mat(_shadow_offset[0], 0.0, -_shadow_offset[1]); RenderRelation *shadow_arc = new RenderRelation(_root, _text_root, _draw_order + 1); shadow_arc->set_transition(new TransformTransition(offset));