All Projects → SCell555 → ShaderCompile

SCell555 / ShaderCompile

Licence: other
Standalone shadercompile, that doesn't depend on valve libraries and supports x64

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to ShaderCompile

Bee2 Items
Standard Items for the BEE2.4
Stars: ✭ 83 (+151.52%)
Mutual labels:  source-engine
Goluwa
a game framework written in luajit
Stars: ✭ 173 (+424.24%)
Mutual labels:  source-engine
VJ-Base
An addon for Garry's mod that contains bunch of bases to make many different types of addons.
Stars: ✭ 57 (+72.73%)
Mutual labels:  source-engine
Async Gamequery Lib
A high-performance java game query library designed for steam/source based games and others
Stars: ✭ 88 (+166.67%)
Mutual labels:  source-engine
Sourcedemorender
Multithreaded, hardware accelerated solution to create high quality movies for the Source engine.
Stars: ✭ 152 (+360.61%)
Mutual labels:  source-engine
Metamod Source
Metamod:Source - C++ Plugin Environment and Detour Library for the Source Engine
Stars: ✭ 177 (+436.36%)
Mutual labels:  source-engine
Source Pbr
Source Engine Physically Based Rendering implementation
Stars: ✭ 73 (+121.21%)
Mutual labels:  source-engine
bsp
Go package for parsing Valve's Source Engine .bsp (Binary Space Partition) map files
Stars: ✭ 29 (-12.12%)
Mutual labels:  source-engine
Bee2.4
Tool to mod Portal 2's Puzzlemaker
Stars: ✭ 152 (+360.61%)
Mutual labels:  source-engine
lgsl
LGSL v6.2.0 for PHP 5.4-8.2.0dev (Live Game Server List): online status for Discord, FiveM, Rust, CS, SA:MP, GMOD, Minecraft, Source Query, etc.
Stars: ✭ 101 (+206.06%)
Mutual labels:  source-engine
Osiris
Free open-source game cheat for Counter-Strike: Global Offensive, written in modern C++. GUI powered by Dear ImGui.
Stars: ✭ 1,851 (+5509.09%)
Mutual labels:  source-engine
Compilepal
A tool to assist in the compiling of source engine maps
Stars: ✭ 122 (+269.7%)
Mutual labels:  source-engine
Sourcebans Pp
Admin, ban, and comms management system for the Source engine
Stars: ✭ 210 (+536.36%)
Mutual labels:  source-engine
Source2 Pfsk
The Source 2 Pancake FPS Starter Kit.
Stars: ✭ 84 (+154.55%)
Mutual labels:  source-engine
Fragsurf-2
Fragsurf is an actively developed standalone game based on HL2 surf and bhop movement mechanics.
Stars: ✭ 68 (+106.06%)
Mutual labels:  source-engine
Fortressforever
A Team Fortress mod on the Source Engine
Stars: ✭ 74 (+124.24%)
Mutual labels:  source-engine
Hl2sdk
Half-Life 2 SDK Mirrors
Stars: ✭ 173 (+424.24%)
Mutual labels:  source-engine
Unity-Source-Tools
Plugin to import resources from the Source engine in Unity3D.
Stars: ✭ 102 (+209.09%)
Mutual labels:  source-engine
source-engine-model-loader
Three.js loader for parsing Valve's Source Engine models
Stars: ✭ 54 (+63.64%)
Mutual labels:  source-engine
Advancedfx
Half-Life Advanced Effects (HLAE) is a tool to enrich Source (mainly CS:GO) engine based movie making.
Stars: ✭ 231 (+600%)
Mutual labels:  source-engine

ShaderCompile

Standalone shadercompile, that doesn't depend on valve libraries and supports x64. Also removes dependencies on external tools (no perl or DxSdk)

Usage

ShaderCompile.exe [OPTIONS] -ver n -shaderdir src_dir shader.fxc

Options

-ver ARG                       Sets shader version, required
-shaderpath ARG                Base path for shaders, required
-crc                           Calculate crc for shader
-dynamic                       Generate only header
-force                         Skip crc check during compilation
-threads ARG                   Number of threads used, defaults to core count

-h, -help                      Shows help
-verbose                       Verbose file cache and final shader info
-verbose2                      Verbose compile commands
-verbose_preprocessor          Enables preprocessor debug printing

-disable-optimization, /Od     Disables shader optimization
-disable-preshader, /Op        Disables preshader generation
-no-flow-control, /Gfa         Directs the compiler to not use flow-control constructs where possible
-prefer-flow-control, /Gfp     Directs the compiler to use flow-control constructs where possible
-partial-precision, /Gpp       Compiles shader with partial precission
-no-validation, /Vd            Skips shader validation

Shader model version support

All shader models starting from PS2.b/VS2.0

Valid options for -ver

20          ps2b/vs20
30          ps30/vs30

Getting started

This assumes you have "clean" Source SDK2013 project.

  1. In game_shader_dx9_base.vpc replace $AdditionalIncludeDirectories "$BASE;fxctmp9;vshtmp9;" with $AdditionalIncludeDirectories "$BASE;include" , shader headers will be now located in more sensible place
  2. Replace cshader.h in public/shaderlib with one from this repo, if you are using VS2013 compiler use the one from VS2013 folder
  3. Place ShaderCompile.exe and process_shaders.ps1 to devtools/bin folder where vpc.exe is located
  4. Replace buildshaders.bat with one from this repo
  5. In buildsdkshaders.bat, remove from all commands -dx9_30 so
    %BUILD_SHADER% stdshader_dx9_30 -game %GAMEDIR% -source %SOURCEDIR% -dx9_30 -force30 
    looks like
    %BUILD_SHADER% stdshader_dx9_30 -game %GAMEDIR% -source %SOURCEDIR% -force30
  6. Optionally remove all perl scripts for compiling shaders from devtools/bin, as they will be never used again
    buildshaderlist.pl
    checkshaderchecksums.pl
    copyshaderincfiles.pl
    copyshaders.pl
    fxc_prep.pl
    psh_prep.pl
    shaderinfo.pl
    uniqifylist.pl
    updateshaders.pl
    valve_perl_helpers.pl
    vsh_prep.pl
    
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].