class_docstr: Per pixel lighting - the lighting model is applied using the interpolated
  coordinates and normals for each pixel. The blending function hard assigns
  the color of the closest face for each pixel.
  
  To use the default values, simply initialize the shader with the desired
  device e.g.
  
  .. code-block::
  
      shader = HardPhongShader(device=torch.device("cuda:0"))
class_docstr_tok: ["Per","pixel","lighting","-","the","lighting","model","is","applied","using","the","interpolated","coordinates","and","normals","for","each","pixel",".","The","blending","function","hard","assigns","the","color","of","the","closest","face","for","each","pixel",".","To","use","the","default","values",",","simply","initialize","the","shader","with","the","desired","device","e.g",".","..","code-block",":",":","shader","=","HardPhongShader","(","device=torch.device","(","``","cuda:0","''",")",")"]
code: def forward(
      self, fragments: Fragments, meshes: Meshes, **kwargs
  ) -> torch.Tensor:
      cameras = super()._get_cameras(**kwargs)
      texels = meshes.sample_textures(fragments)
      lights = kwargs.get("lights", self.lights)
      materials = kwargs.get("materials", self.materials)
      blend_params = kwargs.get("blend_params", self.blend_params)
      colors = phong_shading(
          meshes=meshes,
          fragments=fragments,
          texels=texels,
          lights=lights,
          cameras=cameras,
          materials=materials,
      )
      images = hard_rgb_blend(colors, fragments, blend_params)
      return images
  
imports: import warnings
  from typing import Optional
  import torch
  import torch.nn
  from ...common.datatypes import Device
  from ...structures.meshes import Meshes
  from ..blending import BlendParams, hard_rgb_blend, sigmoid_alpha_blend, softmax_rgb_blend
  from ..lighting import PointLights
  from ..materials import Materials
  from ..splatter_blend import SplatterBlender
  from ..utils import TensorProperties
  from .rasterizer import Fragments
  from .shading import _phong_shading_with_pixels, flat_shading, gouraud_shading, phong_shading
label_desc: Use image node_id 1 for calling the HardPhongShader obj's underlying member method code with example usage: obj.forward(fragments, meshes) and returns: images