nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
LightingRangeTests Class Reference

#include <lighting_range_tests.h>

Inheritance diagram for LightingRangeTests:
Collaboration diagram for LightingRangeTests:

Public Member Functions

 LightingRangeTests (TestHost &host, std::string output_dir, const Config &config)
 
void Deinitialize () override
 Called to tear down the test suite.
 
void Initialize () override
 Called to initialize the test suite.
 
- Public Member Functions inherited from TestSuite
 TestSuite (TestHost &host, std::string output_dir, std::string suite_name, const Config &config)
 
const std::string & Name () const
 
virtual void SetupTest ()
 Called before running an individual test within this suite.
 
virtual void TearDownTest ()
 Called after running an individual test within this suite.
 
void DisableTests (const std::set< std::string > &tests_to_skip)
 
std::vector< std::string > TestNames () const
 
bool HasEnabledTests () const
 
void Run (const std::string &test_name)
 
void RunAll ()
 
void SetSavingAllowed (bool enable=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from TestSuite
static void TagNV2ATrace (uint32_t num_nops)
 Inserts a pattern of NV097_NO_OPERATION's into the pushbuffer to allow identification when viewing nv2a traces.
 
- Protected Member Functions inherited from TestSuite
void SetDefaultTextureFormat () const
 
- Protected Attributes inherited from TestSuite
TestHosthost_
 
std::string output_dir_
 
std::string suite_name_
 
bool allow_saving_ {true}
 
std::map< std::string, std::function< void()> > tests_ {}
 
PGRAPHDiffToken pgraph_diff_
 
bool enable_progress_log_
 
bool enable_pgraph_region_diff_
 
uint32_t delay_milliseconds_between_tests_
 
std::shared_ptr< FTPLoggerftp_logger_
 

Detailed Description

Tests the effects of NV097_SET_LIGHT_LOCAL_RANGE (0x1024).

Each test renders a grid mesh in the center, angled such that the left side is closer to the camera than the right. Two quads are also rendered to the left and the right of the main mesh, the one on the left at a depth close to the camera and the one on the right farther away.

A light is then projected onto the geometry with a range cutoff set such that a portion of the vertices should not be lit.

Constructor & Destructor Documentation

◆ LightingRangeTests()

LightingRangeTests::LightingRangeTests ( TestHost host,
std::string  output_dir,
const Config config 
)
Remarks
Directional Tests behavior using the fixed function pipeline with a directional (infinite) light.
Point Tests behavior using the fixed function pipeline with a point (local) light. Attenuation is set to 0 for the light, resulting in hard edges.
Spot Tests behavior using the fixed function pipeline with a spotlight. Attenuation is set to 0 for the light, resulting in hard edges.

Member Function Documentation

◆ Deinitialize()

void LightingRangeTests::Deinitialize ( )
overridevirtual

Called to tear down the test suite.

Reimplemented from TestSuite.

◆ Initialize()

void LightingRangeTests::Initialize ( )
overridevirtual

Called to initialize the test suite.

Reimplemented from TestSuite.


The documentation for this class was generated from the following files: