-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
organize most stuff and add easy handling for different shader model …
…versions
- Loading branch information
Showing
14 changed files
with
60 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.inc | ||
sound.cache | ||
shaders | ||
src/shaders |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,57 @@ | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
echo Building inc files and worklist for %inputbase%... | ||
set "File=compile_shader_list.txt" | ||
|
||
powershell -NoLogo -ExecutionPolicy Bypass -Command "bin\process_shaders.ps1 'compile_shader_list.txt'" | ||
set "validVersions=20b 30" | ||
set "fallbackVersion=20b" | ||
|
||
echo Done! | ||
echo. | ||
REM Open the file for reading | ||
for /f "usebackq tokens=* delims=" %%A in ("%File%") do ( | ||
set "line=%%A" | ||
|
||
REM Skip empty lines or lines starting with comments | ||
echo !line! | findstr /r /c:"^\s*$" >nul | ||
if !errorlevel! equ 0 ( | ||
REM Skip the line | ||
continue | ||
) | ||
echo !line! | findstr /r /c:"^\s*//" >nul | ||
if !errorlevel! equ 0 ( | ||
REM Skip the line | ||
continue | ||
) | ||
|
||
REM Trim whitespace from the line | ||
set "line=!line: =!" | ||
|
||
REM Extract all valid versions present in the line using the -v-(version) format | ||
set "versionsInLine=" | ||
for %%V in (%validVersions%) do ( | ||
echo !line! | findstr /r /c:"-v-%%V" >nul && set "versionsInLine=!versionsInLine! %%V" | ||
) | ||
|
||
REM If no valid versions are found, fallback to the default version | ||
if "!versionsInLine!"=="" ( | ||
echo Warning: No valid version found in line: !line!. Falling back to version %fallbackVersion%. | ||
set "versionsInLine=%fallbackVersion%" | ||
) | ||
|
||
REM Strip all -v-(version) flags from the line | ||
set "cleanedLine=!line!" | ||
for %%V in (%validVersions%) do ( | ||
set "cleanedLine=!cleanedLine:-v-%%V=! " | ||
) | ||
set "cleanedLine=!cleanedLine: =!" | ||
|
||
REM Compile for each valid version found in the line (or the fallback version) | ||
for %%V in (!versionsInLine!) do ( | ||
set "compileArgs=/O 3 -ver %%V -shaderpath %CD%/src !cleanedLine!" | ||
|
||
echo Compiling '!cleanedLine!' with version '%%V' | ||
call "ShaderCompile.exe" !compileArgs! | ||
) | ||
) | ||
|
||
endlocal | ||
exit /b 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
rndx_r_shaders1_ps2x.hlsl | ||
rndx_bv_shaders1_ps30.hlsl | ||
rndx_bh_shaders1_ps30.hlsl | ||
rndx_vertex_shaders1_vs30.hlsl | ||
rndx_r_shaders1_psxx.hlsl -v-20b -v-30 | ||
rndx_bh_shaders1_psxx.hlsl -v-30 | ||
rndx_bv_shaders1_psxx.hlsl -v-30 | ||
rndx_vertex_shaders1_vsxx.hlsl -v-30 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.