Difference between revisions of "Specular Material (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
(See also)
Line 12: Line 12:
 
== See also ==
 
== See also ==
 
* [[Material (RW Section)|Material]]
 
* [[Material (RW Section)|Material]]
 +
* [[User Data PLG (RW Section)|User Data PLG]]
 
* [[Material Effects PLG (RW Section)|Material Effects]]
 
* [[Material Effects PLG (RW Section)|Material Effects]]
 
* [[Reflection Material (RW Section)|Reflection Material]]
 
* [[Reflection Material (RW Section)|Reflection Material]]

Revision as of 12:21, 15 May 2020

{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
File Format

A Specular Material is one of Rockstar's custom sections. In GTA San Andreas it is used to store material information for specular lighting. The typical location in a SA dff section hierarchy is Clump > Geometry List > Geometry > Material List > Material > Extension > Specular Material.

The Specular Material section is exclusive to San Andreas and Manhunt. To use a specular material, the rendering pipeline that is responsible for rendering the object must support specular materials. This is true by default for vehicles, but not for buildings. To hook specularity into the rendering pipeline, the pipeline extion for the geometries atomic needs to be changed.

Data Layout

 4b - FLOAT    - Specular Level (0.0-1.0)
24b - CHAR[24] - Specular Texture Name, see below

On the PC and Xbox versions of the game a specular texture is not used. On the PS2 however, it is used as a second reflection map. The string is null terminated, and aligned to 4 byte boundaries with extra zeros appended.

See also