Unity 3d demo

An interactive graphics demo built in unity 3d. No unity primitives were used. All the objects, lighting and textures were computed in the script using HL/SL.

4 / 4
Gameplay

    Phong Interpolation

    • Developed two lighting models—headlights and world light—computed using **Phong interpolation** in the fragment shader.
      • Implemented **fragment-based lighting calculations**, combining the **headlight and world light contributions** to determine final illumination.
      • Computed **headlight intensity** by calculating the **dot product of the world object normal and the headlight vector**:
        • World object normal: Normalized value of the object’s orientation relative to world space.
        • Headlight vector: Directional vector from the headlight position to the world-space position of the object.
      • Applied a similar approach to compute **world light contributions**, ensuring realistic lighting effects across dynamic surfaces.
    • Procedurally manipulated models and textures at the CPU level, generating dynamic surface deformations.
      • Created a **warped surface effect** using a **sin function**, dynamically modifying the X and Y UV coordinates of the plane mesh per frame.
      • Generated a **ripple effect** propagating across the surface, achieved through **algorithmic UV distortion and real-time vertex displacement**.

    HL/SL Programming

    • Developed custom shaders using **vertex and fragment shaders** to enhance visual fidelity and dynamic scene rendering.
      • Implemented **a grid shader** by alternating lighting on the object's **UV coordinates**, creating a structured visual effect.
      • Optimized shader performance by leveraging **vertex-level transformations** to ensure efficient real-time rendering.