Skip to content

Make file changes requeired to compile on windows #70

Open

Description

@awils27

I kept hitting shader compile problems on Windows.
I ended up having to alter the Makefile at /renderer/src/shaders/Makefile to fix some file path problems on Windows.

Here's the section I changed:

$(OUT)/d3d/%.vert.h:` d3d/%.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D VERTEX   -I "$(OUT)" $(FXC_DEBUG_FLAG) -T vs_5_0 -Fh "$@" "$<"

$(OUT)/d3d/%.frag.h: d3d/%.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D FRAGMENT -I "$(OUT)" $(FXC_DEBUG_FLAG) -T ps_5_0 -Fh "$@" "$<"

$(OUT)/d3d/render_atlas_stroke.frag.h: d3d/render_atlas.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D FRAGMENT -D ATLAS_FEATHERED_STROKE $(FXC_DEBUG_FLAG) -I "$(OUT)" -T ps_5_0 -Fh "$@" "$<"

$(OUT)/d3d/render_atlas_fill.frag.h: d3d/render_atlas.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D FRAGMENT -D ATLAS_FEATHERED_FILL  $(FXC_DEBUG_FLAG) -I "$(OUT)" -T ps_5_0 -Fh "$@" "$<"

$(OUT)/d3d/root.sig.h: d3d/root.sig
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -I "$(OUT)" -T rootsig_1_1 -E ROOT_SIG -Fh "$@" "$<"

The setup_windows_dev.bat also points to the wrong make path, so after running the bat script, I then changed the path to the correct one using: set PATH=C:\msys64\usr\bin;%PATH%

Otherwise, I generally followed the instructions in #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions