Lesson 7 - set depth

From Bo3b's School for Shaderhackers
Jump to: navigation, search

Summary

Learning how to move on-screen items to a different visual depth.


Level of difficulty: Easy
Time required: 25 minutes

Video Walkthrough on YouTube
Video Walkthrough direct download link


Objective

Revisit how the illusion of depth is created.
Move the HUD to a different depth, from screen depth.

Quiz

...


We are going to switch gears now, because we have covered all the basics, and now understand how all the pieces work together. From here the Lessons will revolve around specific techniques or problems seen in games.

This will be the first, and easiest, of those specific fixes. We are going to look at how to move items on screen to a specific depth of our choosing. This is useful for moving the HUD to a better depth, either further into the screen or even to pop-out if desired. This can also be good for moving nameplates deeper than screen depth, moving the skybox out to infinity where it belongs, or pushing the crosshair deeper than screen depth.

This technique won't fix the depth specifically, but it can still help to have things closer to where they belong, even if it's not at exactly the right spot.



Talk about depth, and parallax, and why it's +- x.


  • Shader hunting a specific effect
    1. Run The Ball, in 3D with HelixMod installed.



Move the HUD out of the screen.


  • Finding the shader, then moving it into ShaderOverride
    1. Navigate to The Ball's game directory with our shortcut.

Busted. Show can't find hud in ball.

Switch to Cryis. Show busted look, then fix by config.