diff options
Diffstat (limited to '3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc')
-rw-r--r-- | 3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc index 02054e3ef28..ea4ce6bdcad 100644 --- a/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc +++ b/3rdparty/bgfx/examples/common/debugdraw/vs_debugdraw_fill_lit.sc @@ -1,4 +1,4 @@ -$input a_position +$input a_position, a_indices $output v_view, v_world /* @@ -10,7 +10,8 @@ $output v_view, v_world void main() { - gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); - v_view = mul(u_modelView, vec4(a_position, 1.0) ).xyz; - v_world = mul(u_model[0], vec4(a_position, 1.0) ).xyz; + vec4 world = mul(u_model[int(a_indices.x)], vec4(a_position, 1.0) ); + gl_Position = mul(u_viewProj, world); + v_view = mul(u_view, world).xyz; + v_world = world.xyz; } |