Skip to content

SpartanJoe193's HLSL files for Halo 3. You can port them to Reach and newer games but I DO NOT RECOMMEND THIS, AT ALL.

Notifications You must be signed in to change notification settings

SpartanJoe193/SpartanJoe-HLSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

If you use other hlsl mods make sure to modify both this set and the other for compatibility. Either way drop the fx files in "...\H3EK\source\rasterizer\hlsl". As for porting to newer games: It's likely compatible with Halo 3 ODST and maybe ElDewrito. Reach+, you will have to do extra work. There's also sample tags you can use you can use (thanks to RynoMods for porting the portable shield)

Functions:

  • Cook-Torrance GGX (base and PBR maps);
  • plasma mask offset (both Halo 1 and Halo 2 implementations);
  • multipurpose map support;

How to set up

We will set things up in the render_method_defintion tag

Steps 1 and 2 are for any custom shader function you made yourself

  1. Open a render_method_definition tag like shaders\halogram.render_method_definition and add a new option block in the category you want to modify. In the new block type the name of your custom pixel shader (e.g. calc_albedo_plasma_offset_legacy). setup

  2. Create a new render_method_option tag. Check the parameters of the HLSL file then add them there. For example. transparent_generic.fx has the float4 (rgba) parameter plasma_color, add that in the render_method_option then set it to rgba color. Float1 paramters are under real, float3 params are rgb color and float4 ones are argb color

Return to the render_method_definition tag you modified then link the render_method_option tag in the option tag reference. Make sure to backup the old one. param fx param setup

We will now create compile the actual shaders

  1. Extract the tags and source folder the to the H3EK root directory e.g. F:/Steam/steampps/common/H3EK. The tags folder already has the necessary shader tags and sample tags that use them. ALWAYS BACK UP THE ORIGINAL RENDER METHOD DEFINITION TAGS.

  2. Run the following commands:

       tool shaders win
       tool dump-render-method-toptions
       start tool generate-templates win shaders\halogram
       start tool generate-templates win shaders\shader
    
    

The commands first compile the explicit shaders then dump the render method options and finally the templates in separate windows.

Check for any errors. If you see PC and durango constant tables do not match do not panic. You are compiling shaaders for Windows, Durango is for Xbox. Always check debug text files for more details.

  1. Open up Sapien. Load any scenario you want like levels\test\box\box and place the sample tags.

  2. If the sample tags' shaders render and they look something like this, then you've succeeded.

final render Notes:

  • The Material Models "Cook Torrance GGX" and its PBR map derivative now work and support the metallic workflow.
  • any tag that uses the functions in transparent_generic.fx is strongly recommended to have calc_self_illumination_transparent_ps setup in the same render_method_definition tag
  • you can to port the hlsl functions to ODST and newer games although as previously stated porting them to Reach+ games require more effort
  • all plasma mask offset functions are unified under calc_albedo_plasma_mask_offset_ps in plasma_mask_offset.fx

About

SpartanJoe193's HLSL files for Halo 3. You can port them to Reach and newer games but I DO NOT RECOMMEND THIS, AT ALL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published