rebuild-effects.sh 492 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. FX_DIR="./Graphics/Effects/Resources"
  3. MGFXC="dotnet mgfxc"
  4. if [ ! -d "$FX_DIR" ]; then
  5. echo "Error: Directory $FX_DIR not found."
  6. exit 1
  7. fi
  8. for file in "$FX_DIR"/*.fx; do
  9. if [ -f "$file" ]; then
  10. filename=$(basename "$file" .fx)
  11. $MGFXC "$FX_DIR/$filename.fx" "$FX_DIR/$filename.ogl.mgfxo" /Profile:OpenGL
  12. $MGFXC "$FX_DIR/$filename.fx" "$FX_DIR/$filename.dx11.mgfxo" /Profile:DirectX_11
  13. fi
  14. done
  15. read -p "Press enter to continue"