2013-05-03 21:34:29 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
tempfile=tmpShaderHeader
|
2014-07-09 23:27:38 +04:00
|
|
|
|
|
|
|
FXC_DEBUG_FLAGS="-Zi -Fd shaders.pdb"
|
|
|
|
FXC_FLAGS=""
|
|
|
|
|
|
|
|
# If DEBUG is in the environment, then rebuild with debug info
|
|
|
|
if [ "$DEBUG" != "" ] ; then
|
|
|
|
FXC_FLAGS="$FXC_DEBUG_FLAGS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
makeShaderVS() {
|
|
|
|
fxc -nologo $FXC_FLAGS -Tvs_4_0_level_9_3 $SRC -E$1 -Vn$1 -Fh$tempfile
|
2015-09-15 11:04:17 +03:00
|
|
|
echo "ShaderBytes s$1 = { $1, sizeof($1) };" >> $tempfile;
|
2014-07-09 23:27:38 +04:00
|
|
|
cat $tempfile >> $DEST
|
|
|
|
}
|
|
|
|
|
|
|
|
makeShaderPS() {
|
|
|
|
fxc -nologo $FXC_FLAGS -Tps_4_0_level_9_3 $SRC -E$1 -Vn$1 -Fh$tempfile
|
2015-09-15 11:04:17 +03:00
|
|
|
echo "ShaderBytes s$1 = { $1, sizeof($1) };" >> $tempfile;
|
2014-07-09 23:27:38 +04:00
|
|
|
cat $tempfile >> $DEST
|
|
|
|
}
|
|
|
|
|
|
|
|
SRC=CompositorD3D11.hlsl
|
|
|
|
DEST=CompositorD3D11Shaders.h
|
|
|
|
|
|
|
|
rm -f $DEST
|
2015-09-15 11:04:17 +03:00
|
|
|
echo "struct ShaderBytes { const void* mData; size_t mLength; };" >> $DEST;
|
2014-07-09 23:27:38 +04:00
|
|
|
makeShaderVS LayerQuadVS
|
|
|
|
makeShaderPS SolidColorShader
|
|
|
|
makeShaderPS RGBShader
|
|
|
|
makeShaderPS RGBAShader
|
|
|
|
makeShaderPS ComponentAlphaShader
|
|
|
|
makeShaderPS YCbCrShader
|
|
|
|
makeShaderVS LayerQuadMaskVS
|
|
|
|
makeShaderVS LayerQuadMask3DVS
|
|
|
|
makeShaderPS SolidColorShaderMask
|
|
|
|
makeShaderPS RGBShaderMask
|
|
|
|
makeShaderPS RGBAShaderMask
|
|
|
|
makeShaderPS RGBAShaderMask3D
|
|
|
|
makeShaderPS YCbCrShaderMask
|
|
|
|
makeShaderPS ComponentAlphaShaderMask
|
|
|
|
|
2016-02-03 03:33:13 +03:00
|
|
|
# Mix-blend shaders
|
|
|
|
makeShaderVS LayerQuadBlendVS
|
|
|
|
makeShaderVS LayerQuadBlendMaskVS
|
|
|
|
makeShaderVS LayerQuadBlendMask3DVS
|
|
|
|
makeShaderPS BlendShader
|
|
|
|
|
2014-07-09 23:27:38 +04:00
|
|
|
SRC=CompositorD3D11VR.hlsl
|
|
|
|
DEST=CompositorD3D11ShadersVR.h
|
|
|
|
|
|
|
|
rm -f $DEST
|
2015-06-05 20:14:10 +03:00
|
|
|
makeShaderVS Oculus050VRDistortionVS
|
|
|
|
makeShaderPS Oculus050VRDistortionPS
|
2014-07-09 23:27:38 +04:00
|
|
|
|
2014-07-03 04:48:18 +04:00
|
|
|
rm $tempfile
|