Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
Shader_Minifier
Commits
a59a1c85
Commit
a59a1c85
authored
Apr 26, 2017
by
Laurent Le Brun
Browse files
Some cleanup (e.g. README file).
parent
fe54157e
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
a59a1c85
Shader Minifier
===============
#
Shader Minifier
Shader Minifier is a tool that minifies and obfuscates shader code
(GLSL and HLSL). Its original use-case is for the
...
...
@@ -15,10 +15,38 @@ The code is tested with:
Slightly outdated user manual:
http://www.ctrl-alt-test.fr/?page_id=7
## Usage
Download Shader Minifier here: http://ctrl-alt-test.fr/dl/shader_minifier.exe
It is a command-line tool. Without argument, it will show the usage. If you are
not on Windows, you will need mono:
```
$ shader_minifier.exe # Windows
$ mono shader_minifier.exe # Linux, Mac...
```
## Important options
*
List the shaders you want to minify on the command-line.
*
Use
`-o`
to choose the output file (by default, it will use
`shader_code.h`
).
If you pass an empty string for the output, it will be printed on stdout.
*
Use
`--format`
to control the output format. By default, it will create a C
header. There are other options to get only the shader, or have it in a .js or
nasm file.
*
Use
`--help`
to see all the options. You can for example have some control on
what gets renamed.
Contributions are welcome.
Laurent Le Brun
, aka LLB from
Ctrl-Alt-Test.
Created by
Laurent Le Brun
(LLB /
Ctrl-Alt-Test
)
.
http://laurent.le-brun.eu
http://ctrl-alt-test.fr
TODO
deleted
100644 → 0
View file @
fe54157e
* Get a proper test suite. Seriously.
* Update to F# 3.0 (not tried, maybe it already works).
* Update to FParsec 1.0. This requires a couple of easy changes in
parse.fs.
* Simplify the release process. Ideally, we should get a single .exe file
that works both on Microsoft .NET and on Mono.
* Some antivirus (eg. Avast) don't like Shader Minifier. No idea why.
* Performance. I suspect that using StringBuffer in the printer would
drastically improve performance.
* All the bug reports I've received. I should do some triaging.
compile.bat.foo
deleted
100644 → 0
View file @
fe54157e
@echo off
"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe" -o:shader_minifier.exe --noframework --optimize+ -r:D:\Laurent\Shader_Minifier\Shader_Minifier\lib\FParsec.dll -r:D:\Laurent\Shader_Minifier\Shader_Minifier\lib\FParsecCS.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v2.0\2.3.0.0\FSharp.Core.dll" -r:D:\Laurent\Shader_Minifier\Shader_Minifier\lib\FSharp.PowerPack.dll -r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" -r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll --target:exe --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- --sqmsessionguid:e89d638f-5243-4e0b-bd3d-2c4d190d1bae --standalone src\ast.fs src\printer.fs src\cGen.fs src\renamer.fs src\rewriter.fs src\parse.fs src\main.fs
test.bash
View file @
a59a1c85
#! /bin/bash
references
=
'-r lib/FParsec.dll -r lib/FParsecCS.dll -r lib/FSharp.PowerPack.dll'
fsharpc
--standalone
$references
src/
{
ast.fs,printer.fs,cGen.fs,renamer.fs,rewriter.fs,parse.fs,main.fs,tests.fs
}
-o
tests.exe
&&
./tests.exe
||
echo
"tests.exe failed."
fsharpi
--quiet
--exec
src/tests.fs
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment